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 

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

 

解决办法有两种如下:

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

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

2: ES6 箭头函数写法

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

就可以解决这个问题

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2021-04-04
  • 2022-12-23
  • 2021-05-29
  • 2021-07-30
猜你喜欢
  • 2021-11-29
  • 2021-07-16
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案