Replies: 2 comments 2 replies
-
|
I don't think you need to. Does it break without the condition / is the fetch called at dismount? useEffect(() => {
const asyncFetch = async () => {
const data = await fetch('');
setData(data);
};
asyncFetch();
}); |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
The store is outside of React so it should be fine without the mount checks. With a react-bound store model this could be needed depending on what your app does. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Do I need to confirm
mountedbeforesetin zustand?Thanks.
Beta Was this translation helpful? Give feedback.
All reactions