Docs > API > useFetchers > not using useState in example code #1548
DrummerHead
started this conversation in
General
Replies: 1 comment
-
That's what you could call "derived state": It depends on For detailed information, I recommend reading Don't Sync State. Derive It! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Reading the useFetchers' example code I notice that the state
completedTasks
inside the component is a javascript const and not contained in auseState
hook.Inlined here for your viewing pleasure:
Doesn't this mean that the state change will not be recognized by React and UI not updated? Or perhaps I'm misunderstanding or not aware of something?
If the change is desired, I can do a PR with it 👍
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions