Dispatch Redux action in loader will be cleared by useEffect cleanup function in strict mode #11965
Unanswered
itschiaming
asked this question in
Q&A
Replies: 1 comment
-
Because you violate the useEffect's usage |
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.
-
I just migrated from v3 to v6 and started using data loader to fetch data, but ran into a problem because of the React.StrictMode.
This is the simplify route:
Above code will work in production environment, but in StrictMode everything I did will be cleared by the clearData().
Any ideas on how to fix it? thanks!
Beta Was this translation helpful? Give feedback.
All reactions