-
-
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
Possible race condition with useSelector #1508
Comments
The ref that's in question here is Yes, there is likely a problem with re-rendering a previously errored out I'd like to see the use case where they're running into this. Is there a Codesandbox to demonstrate? It would seem the simpler fix is to just add |
I know @Jessidhia works on a pretty complex app (and possibly uses CM/Suspense in it?), so not sure how reproducible it is. |
We're experiencing a similar problem. Not sure if it's the same as OP, but possibly. Our app is also pretty complex with a mix of class and hook components. When we rewrote a class component using I've created a simple repo with both a test page and a failing test: https://github.com/mlandalv/react-redux-useselector-prob |
If it's about child components that dispatch in |
I wonder if #1536 solves @Jessidhia case. Do you have any chance to try it out? |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
This was reported by @Jessidhia over in Reactiflux, so I'll paste her writeup:
What is the expected behavior?
Presumably that whatever race condition here doesn't happen.
Which versions of React, ReactDOM/React Native, Redux, and React Redux are you using? Which browser and OS are affected by this issue? Did this work in previous versions of React Redux?
I assume React-Redux v7.1.x.
Note that this overlaps with the refactoring we're doing in #1506 , and we should look at the gist to see what changes are there and if we can apply them. I'd also like to figure out if we can replicate the problem being seen, prior to applying the memory leak changes.
The text was updated successfully, but these errors were encountered: