-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Suspense boundary received an update before it finished hydrating #1962
Comments
Hmm. Unfortunately I don't know enough about Suspense or transition behavior to have any idea if this is a bug or something that's expected :( Don't suppose @Andarist might have a clue? |
The linked replay is private so I can't take a look. However, based on the provided description - I would say that it would be best to first file an issue in the React repo. If there is a suggestion in the warning message about adding You could also try to experiment with |
@Andarist I've made the Replay public, sorry about that. I will follow your advice and post an issue in the React repo. Thanks! |
This seems to be the same issue as facebook/react#24810. I reduced my example further to remove |
What version of React, ReactDOM/React Native, Redux, and React Redux are you using?
What is the current behavior?
Full reduced test case: https://github.com/OliverJAsh/react-redux-suspense-issue
The main code can be found here: https://github.com/OliverJAsh/react-redux-suspense-issue/blob/7540831b4afb8e3811afaad489bd2e456e80e4b1/src/App.js
Replay: https://app.replay.io/recording/untitled--d46adaf3-b286-4dfa-a1a7-ebe5cadd3568
Follow the steps in the
README
to build the server and client and run the server, then navigate tohttp://localhost:8080
.In the console we can see this error:
What is the expected behavior?
There should be no error.
The
dispatch
call is wrapped instartTransition
, as suggested by the error message, but that doesn't seem to help.I searched existing issues to see if anyone else has reported this error and all I could find was this: #1797 (comment)
I did also find this issue in the React repository which appears to be describing something very similar. However, the suggested fix to use
startTransition
doesn't help in this case, so I think there might be more to this.I was able to workaround the error by wrapping the
Suspense
boundary withReact.memo
, but this seems like a hacky workaround rather than a real solution:For context also, this is an issue I noticed whilst trying to adopt
Suspense
at Unsplash.Which browser and OS are affected by this issue?
No response
Did this work in previous versions of React Redux?
The text was updated successfully, but these errors were encountered: