Share useForm in several components
I’ve seen several posts mentioning the withForm hook, so I’ve created an implementation using it. At the moment, all the context-related code lives in its own file, which is then imported into the files where it’s used.
I have a top-level component that initializes the form and uses useStore. After that, I try to pass the form down as a prop to a component, which receives it and then passes it further down to two other components. This is where I get a type error on the prop.
Does anyone have an example of this kind of setup that I could look at, where I might be able to see what I’m doing wrong?
I have a top-level component that initializes the form and uses useStore. After that, I try to pass the form down as a prop to a component, which receives it and then passes it further down to two other components. This is where I get a type error on the prop.
Does anyone have an example of this kind of setup that I could look at, where I might be able to see what I’m doing wrong?