-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fixes subscription bug when a new store is passed as a prop. #589
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
Conversation
Thanks @jimbolla - the general idea is that this should work: // overly simplified for clarity
<Provider store={store}>
<Foo>
<Bar store={ownStore} />
</Foo>
</Provider> If I'm not mistaken, |
Correct. I think there's an edge case to this edge case I'm not covering so I'm gonna keep working on it, but this should be better. |
OK. Now I think I covered the edge cases correctly. |
@timdorr Thoughts on pushing a patch release for this and the other handful of fixes we have waiting to go out? |
Any updates on this? Will it be able to be merged in soon? 🙏 |
@jimbolla , @timdorr : following up on this at @davidkpiano 's request. It's Jim's code thus far, and Tim's been cutting releases (something I should go figure out for myself at some point, but don't have time to dig into atm). Are we good to go on this? |
I haven't had time to really dig into this one. It's a non-trivial change, hence the hesitation to just blindly merge it in. If anyone else wants to review, I trust them to point out any problems. |
Yeah, that's actually how I feel about this myself at the moment :) |
@timdorr @markerikson It might be easier to review the 2 commits separately. The bugfix one is pretty small and the refactor one just moves a few things and adds some more comments. |
OK, LGTM. In the future, I'd submit refactors as either separate PRs or just directly onto master. |
@timdorr please release this fix |
@timdorr The Basically after a hot-reload the state is somehow broken. This worked fine in repo to reproduce: https://github.com/BerndWessels/react-redux-rr4-wp2-rhl3.git Work fine with |
…#589) * Fixes subscription bug when a new store is passed as a prop. Reported here: davidkpiano/react-redux-form#592 * Refactors and adds more comments to connectAdvanced
Reported here: davidkpiano/react-redux-form#592