Closed scriptist closed 4 years ago
Hi scriptist! Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!
Thanks for the PR! Instead of pulling in another library as opposed to shallowEqual
, I propose (#75) we release a new major version of redux-react-hook
in which you pass in your own equality comparator. That way you won't be tied to a particular comparison implementation.
The current
shallowEqual
implementation always returnstrue
when the provided values are bothSet
s orMap
s. This results in components failing to re-render when a Set or Map changes.To resolve this, I've switched to the
fast-equals
implementation ofshallowEqual
, which has built-in support forSet
s andMap
s.I've also added a test that confirms this behaviour.