Passing form all the way down - is there a better way?
#1701
Unanswered
alex-collibra
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say there is this components tree
For now I can't think of any good way to pass
formfromTopLevelComponenttoFormPart1without prop drilling.Should also wrap my
NestedComponentwithwithFormand then passformprop toFormPart1which I should also wrap withwithForm?Should I add
NestedComponent,FormPart1andFormPart2toformComponentsand then do this?If I do it that way
formtype won't be picked up and it won't have neither ofNestedComponent,FormPart1etc.Because even if I use it this way I am still forced to pass form around in one way or another, which doesn't look like a clean solution. Am I missing something?
I checked examples but most of them have forms, which are only one level nested.
Beta Was this translation helpful? Give feedback.
All reactions