Two nested 'FormProvider', where the child wants to access the parent instance #3675
-
I want to use a different instance in the main screen and in the modal. A simple sample has been created. https://codesandbox.io/s/react-hook-form-v6-form-context-forked-5y4l9?file=/src/Dialog.js I want to click 'submit' in the dialog and get the value of the main screen. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
is this a possible solution? instead burry two useForm inside of each others? |
Beta Was this translation helpful? Give feedback.
-
I have a similar problematic with modal : #3704 But I don't want to access to the parent methods. |
Beta Was this translation helpful? Give feedback.
is this a possible solution? instead burry two useForm inside of each others?