我正在尝试实现来自react-hook-forms for react-select的react-select,但为了做到这一点,我需要使用来自react-hook-forms的Controller,但是当我使用我的react-select component代码import Select from 'react-select';
impo
根据react-hook-form的文档,我可以像这样使用输入元素的名称"xxx.yyy“,这将导致我准备的数据是 { xxx: { yyy: value }} 但是,当我尝试使用这个带有“错误”的功能时yyy && <span>This field is required</span>} 但是,如果省略了必需的输入,则不会在页面上显示任何内容。我可以看到这个机制阻止表单被提交,直到我在这个字段中写了一些东西,这是可以的,但是为什么我在页面上看不到错误</
无法编译错误: Line 6:43: ReactHook "useState" is called in function "app" which is neither a Reactfunction component or a custom ReactHook function react-hooks/rules-of-hooks
Line 14:39:
我的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