报错内容: Line 8:28: React Hook "useState" is called in function "index" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use" react-hooks/rules-of-hooks
图片:
原因:函数命名时index 小写了 首字母应为大写
应改为