facebookarchive / redux-react-hook

React Hook for accessing state and dispatch from a Redux store
MIT License
2.16k stars 103 forks source link

Don't resubscribe if mapState changes #50

Closed Turanchoks closed 5 years ago

Turanchoks commented 5 years ago

I noticed that you closed https://github.com/facebookincubator/redux-react-hook/pull/9 but I think the idea is good and it shouldn't be a problem if ref is assigned in the commit.

I thought that this might help with the stale props problem since the order of subscribers is not altered but this still doesn't help much since a child can mount at any time after parent.

ianobermiller commented 5 years ago

Oh, I mistakenly though this was covered in your last PR.

On Sat, Apr 6, 2019 at 4:27 AM Turanchoks notifications@github.com wrote:

I noticed that you closed #9 https://github.com/facebookincubator/redux-react-hook/pull/9 but I think the idea is good and it shouldn't be a problem if ref is assigned in the commit.

I thought that this might help with the stale props problem since the order of subscribers is not altered but this still doesn't help much since a child can mount at any time after parent.

You can view, comment on, or merge this pull request online at:

https://github.com/facebookincubator/redux-react-hook/pull/50 Commit Summary

  • don't resubscribe if mapState changes

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/facebookincubator/redux-react-hook/pull/50, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2zi3V6XfIZ9WsJ6DXQ5vB6dxR3tJYZks5veIS8gaJpZM4cgJw- .