Any way to provide context after the useForm has been created? #11822
Unanswered
nicostombros
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a situation where I have the following code
As you can see, I have some state, a form initialised with useForm and a component that uses the setter to pass UP the additional fields to be set, which is then used in the form context. I was wondering if there's a neater way to set some context? Since I'm constantly doing this bidirectional dance with the flow of data — I'd rather have some way to use the form in
MySubForm
to then set the context there instead of having the state lifted up to the parent form.Something like where in the MySubForm component I could do
Has anyone else encountered this problem and how might I deal with this?
Beta Was this translation helpful? Give feedback.
All reactions