[v7.39.4] How to have correct type for "fields" from useFieldArray in another file #9415
-
I'd like to have my Problem is, I can't seem to make it work when doing so in another file, the type for So far I've tried:
Any help is welcome, thank you so much! Edit: here is a sandbox environment with this issue and comments about it https://codesandbox.io/s/react-hook-form-usefieldarray-rules-forked-jw970u?file=/src/index.js |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I propose using |
Beta Was this translation helpful? Give feedback.
-
With TS, you can export the custom defined |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
I propose using
control
so the other useFieldArray knows what you want it to represent.