Replies: 1 comment
-
Apart of fetcher.data, there's also fetcher.state going from idle to submitting to idle again, also other parts of the router state needs to change and since React context has no way to only subscribe to a part of a value any internal state change in the router will cause a re-render. Remember that re-renders are not bad, slow renders are bad, if you component render fast enough there's no issue will letting it re-render many times. |
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
-
when I use useFetcher in some submit, the server action return data, then I in the component use fetcher.data console.log in the chrome console print 4 times ?why
Beta Was this translation helpful? Give feedback.
All reactions