Do not expose state through useForm().state since it is not reactive #1101
Unanswered
rodrigofariow
asked this question in
Ideas
Replies: 1 comment 1 reply
-
Your concern is entirely understandable. However, the Is there anywhere in our docs where we could clarify not to use I wouldn't be opposed to marking it as |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there @crutchcorn !
I got tricked into thinking that
state
returned byuseForm
was reactive.This is not the case AFAIK, hence why you provide selectors.
However, this should be clear from a consumer point of view. If
form.state
is not reactive, it shouldn't even be provided?People could do
const formState = useStore(form.store, state => state)
and this is surely reactive so there are no surprises.To clarify my use case:
Thanks for your time 🦾
Beta Was this translation helpful? Give feedback.
All reactions