Understand the useForm.tsx file
I visited your source code, and I was a bit confused.
I noticed that this hook calls
useStore
inside a function, which violates the React hooks rule, So how it possible to do that, and how it's stable?
thanks
2 Replies
exotic-emerald•2y ago
useStore
isn't being called inside of a function here. It's being called inside of a custom hook that's being declared and returned by useForm
It's admittedly a mind bender, but we're not breaking any rules of React herelike-goldOP•2y ago
got it, thanks