我试图在我的功能组件中使用React useState钩子,但是我得到了这个错误:./src/Person/Person.js
Line 5:43: ReactHook "useState" is called in function "person" which is neithera React function component or a custom Re
我有一个函数,每次名称状态改变时都会调用该函数。我想把这个更改后的值发送给父组件,但它指出了这个错误:
ReactHook "useEffect" is called in function "handleNameChange" which isneither a React function component or a custom ReactHook function <e
我的react应用程序在浏览器中显示以下错误./src/pages/home.js
Line 24:30: ReactHook "useQuery" is called in function "home" which is neithera React function component or a custom ReactHook