错误
这是浏览器在网页上显示的错误。
Compiled with problems:X
ERROR
src\components\SignIn.js
Line 5:21: React Hook "useRef" is called in function "signin" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React
我正在尝试使用react-bootstrap创建一个Modal react-hook-form with fullscreen modal without form WORK 但是,当我添加表单时,Modal在全屏中不能正常工作。 react-hook-form with fullscreen modal with form NO WORK 我认为问题是在哪里找到表单,以便它在html中正确打印。 谢谢!
我有一个 and表单,当我按下提交按钮时,就可以在onFinish function中获取表单数据,在该按钮中,我希望使用uesEffect hook,并将表单数据作为有效负载分派到redux中,但我得到了以下错误
React Hook "useEffect" is called in function "onFinish" that is neither a React function component nor a custom React Hook function.
如果我在onFinsh 函数之外编写useEffect钩子,则无法获得表单数据/值。
我是一个初学者使用(我已经使用了一段时间了),我正在尝试在我的事件处理程序中使用自定义钩子。
但是,我收到这样的错误:
React Hook "useMyCustomHook" is called in function "onSubmit" which is neither a React function component or a custom React Hook function react-hooks/rules-of-hooks
这是我的代码:
import MyCustomHook from './myCustomHook';
我使用React钩子来表示状态,但是当我使用useState时,它显示了一个错误,即:
Compiled with problems:X
ERROR
src\Form.js
Line 9:29: React Hook "React.useState" is called in function "form" that is neither a React function component nor a custom React Hook function. React component na
我正在开发一个使用电容、离子、React的应用程序,最近我在第一次使用React Hook Form和YupResolver时遇到了以下错误: 当我试图运行这个项目时,我得到了这个错误: Failed to compile
./node_modules/@hookform/resolvers/dist/resolvers.module.js
Attempted import error: 'set' is not exported from 'react-hook-form' (imported as 'o'). 我想创建并验证一个用于更改密码
我很难弄清楚如何处理不一定与react-hook-form中的单个输入字段相关的错误。换句话说,我如何处理handleSubmit错误?
例如,具有以下形式:
import to from 'await-to-js'
import axios, { AxiosResponse } from 'axios'
import React from "react"
import { useForm } from "react-hook-form"
type LoginFormData = {
username: string,