-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
TypeError: dispatcher.useSyncExternalStore is not a function. #3839
Comments
Could you please try updating your |
plase try with @tanstack/[email protected] |
Unable to install
|
@joealden I unable to do this too, due to Expo sdk version
Latest expo sdk is version 45 I done this anyway,
get the warning, but the app work, can start, no crash at the same time, I can confirm that this error:
is not shown anymore in 0.69.1 but 0.68.2 will occurred the error |
@kenchoong to give some more context on why the error occurs, it'll be because v4 makes use of the However, as you are depending on a And while I understand that the current expo SDK version doesn't yet officially support |
@joealden Thanks I think for now I will stick with
Because when I downgrade to react 17.0.2, it causing problem for me in Nextjs in another library. The version above is good for me for now |
Nice, even better |
gonna close this for as I don't think there is something we can or need to do. |
I got the same error when using the "useSyncExternalStore" hook in React Native. I have tried to solve the issue for React Native. I only change versions of React and React native both as below. After that, the error was gone! "react": "18.2.0", |
Describe the bug
I hit this error:
What I have done:
Above is my setup, then when I test the app by going to
Screen
in iOS and Android, I get this errorHere is the call stack I got in Expo Go.
It is cause by
useSyncExternalStore
anduseBaseQuery
which is fromreact-query
package.To solve this, I have read this issues #3582,
I at first in latest "react-query": "4.0.0-beta.24",
Then I tried, beta.7, beta.10, beta.1 (as mention in the issue above)
All having the same error.
Your minimal, reproducible example
n/a
Steps to reproduce
react-query@beta
Note: no need a real API for this, the app just hitting the error once the Screen open.
Expected behavior
Screen
URL
axios.data
with `Article data insideHow often does this bug happen?
No response
Screenshots or Videos
Platform
react-query version
v4.0.0-beta.1, v4.0.0-beta.7, v4.0.0-beta.10, v4.0.0-beta.24
TypeScript version
~4.7.2
Additional context
The same setup
Screen
above running in Nextjs, having no problem, means that the behavior same exactly like the Expected behavior belowI am using
The text was updated successfully, but these errors were encountered: