Question regarding last blog post #5740
-
So, I read the following:
I am guitly of doing this. It says that react query is already a state manager. So, if i have an input PS. Right now what i do it: update the react state and then use it as value inside the input, so when it is updated, it rerenders the changed value -- but reading the blog post thats a big no no. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
you still need local state to perform ephemeral updates. You're looking at "form state", which gets initialized with values from the server. Have a read at: https://tkdodo.eu/blog/react-query-and-forms in your contrived example, I'd do:
|
Beta Was this translation helpful? Give feedback.
you still need local state to perform ephemeral updates. You're looking at "form state", which gets initialized with values from the server. Have a read at: https://tkdodo.eu/blog/react-query-and-forms
in your contrived example, I'd do: