Type of the default value for 'songs' prop must be a function

eslint常会出现这样的错误提示,控制台打印:Type of the default value for 'songs' prop must be a function 

 

解决办法有两种如下:

1:写一个函数,return一个数组

2: ES6 箭头函数写法

就可以解决这个个问题

posted @ 2018-05-31 10:39  shengnan_2017  阅读(1572)  评论(0编辑  收藏  举报