Per #74, I propose 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 motivation for this change is that returning an ES6 Map directly from mapState would cause shallowEqual to return true, and then the component won't re-render, even if the map instance has. After this change, your comparison function can either handle Map and Set by reference, or perform a shallow comparison on the values.
Per #74, I propose 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 motivation for this change is that returning an ES6 Map directly from
mapState
would causeshallowEqual
to returntrue
, and then the component won't re-render, even if the map instance has. After this change, your comparison function can either handleMap
andSet
by reference, or perform a shallow comparison on the values.