Issue: Using "update()" with useFieldArray isn't working #10698
-
Version NumberLocal project: "react-hook-form": "^7.44.3", Codepen: 7.4.1 Codesandbox/Expo snackhttps://codesandbox.io/s/happy-bush-9w5ytf?file=/src/App.tsx Steps to reproduceWhen using the ![]() Expected behaviourExpected to be able to use What browsers are you seeing the problem on?Chrome Relevant log outputOn my local project:
Expected 2 arguments, but got 0.ts(2554)
fieldArray.d.ts(164, 155): An argument for 'index' was not provided. On the attached codepen:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
The root cause is from mismatch version of typescript inside your project and react-hook-form. Please upgrade to the latest react-hook-form to use with typescript version >= 5 or downgrade your project typescript version to 4.2.3 to stick with react-hook-form 7.4.1 . |
Beta Was this translation helpful? Give feedback.
@douglasrcjames
Method
update
fromuseFieldArray
hook was never been called without parameters.Reference: https://github.com/react-hook-form/react-hook-form/releases/tag/v7.11.0