Single or multiple useAppForm() per project?
This is something that isn't made very clear in the documentation, I think. From the name, I gather that it should be one hook used by all forms in the project. But some of the use-cases I've seen implies that you should create one useAppForm for each distinct form.
So I figured I'd stop by and ask you experts which one it is!
5 Replies
rival-black•2mo ago
I am just using a single one.
sensitive-blue•2mo ago
one per project.
If you're worried about the amount of components, you can lazyload them.
fair-rose•3w ago
Why is this better than having multiple?
sensitive-blue•3w ago
because there‘s no point in the duplication. To be HMR compatible, the form context has been moved to module level, so there‘s also no context difference between the two
fair-rose•3w ago
thanks!