这个坑,真的很小很小,就被绊倒了,困扰了好几天,网上也没找到关于这个坑的解决办法。
源码是这样的:
React Hook xx is called in function xx which is neither a React function component or ...
然后报错信息:
React Hook xx is called in function xx which is neither a React function component or ...
问题就出现在函数的取名,函数名首字母要大写 我的函数名是slider 改为Slider就不会报错了

相关文章:

  • 2021-10-07
  • 2021-11-26
  • 2021-05-02
  • 2022-01-18
  • 2022-01-07
  • 2021-12-14
  • 2022-01-10
  • 2021-10-24
猜你喜欢
  • 2021-04-08
  • 2021-06-07
  • 2021-11-25
  • 2021-05-12
  • 2021-11-07
  • 2021-11-13
  • 2022-01-06
  • 2021-11-13
相关资源
相似解决方案