All Questions
Tagged with react-hooks react-hook-form
344
questions
0
votes
1
answer
19
views
Why doesn't webstorm/react-hook-forms tell me possible options for name?
I want to make components with inputs, but at the moment I have a problem that with the current implementation I don’t have tooltips for name, but I would like form fields to be displayed in name.
...
1
vote
1
answer
38
views
React Hook Form defaultValues NOT updating when navigating to a new route with React Router Data Loader
I have a Product component that uses a data Loader with the useLoaderData hook from React Router. The component contains a React Hook Form with the useForm hook and I am passing in defaultValues for ...
0
votes
3
answers
61
views
Rendering UI in React JS [duplicate]
I recently learnt that React renders a snapshot of the UI before the set function is called to change the state and re-rendering is perform. The entire JSX works with the previous state. For example:
...
0
votes
0
answers
35
views
Select all checkboxes in React Hook Form not working
I am trying to created a checkbox, on clicking which select all other checkboxes in react hook form, and on unchecking it will deselect all checkboxes. I also want to add selecting single checkbox ...
0
votes
0
answers
71
views
Select all checkboxes in React Hook Form
I am trying to created a checkbox, on clicking which select all other checkboxes in react hook form, and on unchecking it will deselect all checkboxes.
I also want to add selecting single checkbox ...
0
votes
0
answers
65
views
Change react-hook-form input value with custom hook [duplicate]
For a registered input, I failed to update it using my own custom hook. In my sample codes as shown below, the result2 didn't set to "bar" when the button was clicked, although r2 was ...
0
votes
2
answers
33
views
How to store value in an array from text box on button click in React
I am new to react and trying to understand the useState hook. What I am trying to do is, I have a input type text field and a button. On click of button, I am trying to push the entered value to an ...
0
votes
1
answer
324
views
setValue not working with Controller in react-hook-form
I am using react-hook-form with MUI components. To use the Select component, I have wrapped it in the Controller as it can't be registered directly. Everything is working but setValue.
Here is the ...
0
votes
0
answers
24
views
Type 'UseFormRegister<AppointmentProps>' is not assignable to type 'UseFormRegister<FieldValues>
I'm trying to learn TypeScript and react-hook-form, and I get this warning. What I'm doing is passing the register as a prop,
Type 'UseFormRegister<AppointmentProps>' is not assignable to type '...
0
votes
0
answers
19
views
Need to pass different default values to different child component form from parent and doesn't want to loose either default value on rendering
I'm trying to set pass 2 different default values to 2 different child component from parent. But i am not able.Some how whether it is first defaultvalue or second defaultvalue get rendered to 2 ...
0
votes
2
answers
60
views
typescript - function param type second rely on first one
I'm a typescript newbie.
Description
I have a typescript react application, and now I've had a problem that I need to dynamic watch the values comes out of the watch() from react-hook-from based on ...
0
votes
0
answers
57
views
I am not able to use setValue funtion of react-hook even I am providing the right arguments and it is giving me error
I am building a dynamic form in which I am using react-hook-form for registering the data, I ahave used two models one for fetching data from api which is DewFormdetail and FormDataset for storing the ...
0
votes
1
answer
641
views
React-hook-form: Reset / Empty An Input File
I am new to React and I want to create a button to reset/empty the input file for edit functionality. I am using MUI and React-hook-form. When I clicked the reset button, the image had already changed,...
1
vote
1
answer
85
views
Setting state inside useEffect triggers infinite loop
Im creating a custom autosave hook for my project that uses react-hook-form. Inside this custom hook I want to add two pieces of state, isSaving and saveMessage
The custom hook works fine until I ...
0
votes
2
answers
1k
views
React-hook-form - watch causing an infinite loop
I'm using react-hook-form inside of a Form component.
The Form component has to update its container - App component.
The From component should not have a submit button.
Therefore, a watch method of ...