-
-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[jotai/query] atomWithQuery gets stuck in react strict mode #1418
Comments
Thanks for reporting. Seems like a bug. We have struggled with StrictMode and something might still be missing. Can you or anyone create a test case from the codesandbox, and then possibly try to fix it (though, it requires deeper understanding of the current implementation.) |
I wanted to debug it in context of my project but unfortunately I was unable to make it work. |
#1435 would probably fix it, if it's done. |
Thanks, it seems to also work with my full project. Requests are cancelled as before due to unmount but then retried on mount. |
https://codesandbox.io/s/jotai-query-stuck-in-strict-8ffrtn?file=/src/App.tsx
If
<React.StrictMode>
is enabled then the query is stuck showing placeholder data.Also, in bigger application I have this problem even without placeholderData - there the query is forever stuck in loading state with no observers attached. Seems to happen when there are many derived atoms. Hopefully it's the same root cause since I haven't been able to create smaller test case without placeholderData.
The text was updated successfully, but these errors were encountered: