-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Why only mergeProps
called when component isn't pure?
#118
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
Comments
Might be. Can you submit a failing test? |
Seems like a bug to me. I think I'll fix this in couple of days (if you don't beat me to it with a PR). Meanwhile can you try whether it fixes the issue for you? |
I think it also should include |
I found a workaround, so I can't test it right now, but I sure it will work. |
@epeli it works, thank you |
First of all, I'm using Relay. It means that redux own only part of my state and I have a problem with it.
I wrapped my
App
component usingconnect
because I want to get locale info from store.If I keep
pure
option astrue
thenconnect
prevents re-rendering, because nothing changed in redux.But, If I set
pure
option intofalse
,connect
doesn't recallmapStateToProps
andmapDispatchToProps
, sostateProps
anddispatchProps
are cached forever.Is it a bug?
https://github.com/rackt/react-redux/blob/master/src/components/createConnect.js#L93
The text was updated successfully, but these errors were encountered: