-
Notifications
You must be signed in to change notification settings - Fork 4
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
Will probably not work on advanced usecases #1
Comments
@slorber Thx, I will have a look at it. Probably you are right, if your state contains DOM related info and the rendering hasnt finish the middleware will not measure correct. But, just out of curiosity, why to hold inside your state the actual DOM info and not a description of it that React could use to build the DOM again if needed? |
Uhhh? Where did I say that I hold DOM info inside the state? I have a perfectly reasonable usage of Redux that do not do such a thing. When you use |
@slorber I see the issue, but I dont see how it can be fixed in the context of this middleware if redux is not using the |
@AvraamMavridis I don't expect you to do anything, it must be solved by connect first that's why I pointed to an existing react-redux issue |
cool. |
Hi,
When an action is dispatched and connect's HOC are triggered, they call setState on it. You have no guarantee that the execution of the React rendering will be synchronous to your action dispatching. It may work in your simple example but will not in more advanced ones unless react-redux's connect permits to know when all underlying components have finished to render (ie listener to this.setState's callback).
See also reduxjs/react-redux#269 (comment)
The text was updated successfully, but these errors were encountered: