You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?
bug
What is the current behavior? useSelector method uses shallowEqual util to force update when value is changed and it does not work when I compare 2 es6 maps.
What is the expected behavior? shallowEqual util with 2 different maps should return false
Which versions of React, ReactDOM/React Native, Redux, and React Redux are you using? Which browser and OS are affected by this issue? Did this work in previous versions of React Redux?
React: v16.8.6
Redux: v7.1.0-alpha.4
The text was updated successfully, but these errors were encountered:
With connect you can pass manual equality checking function, instead of shallowEqual, but there is no way to do it with useSelector, there is no way to fix these kind of cases and turns out I need to rewrite lots of my code, because I have different data structures used on my components. Also transforming to other data types may be overhead. I suggest to add some way to support manual comparison of values for useSelector
Do you want to request a feature or report a bug?
bug
What is the current behavior?
useSelector
method usesshallowEqual
util to force update when value is changed and it does not work when I compare 2 es6 maps.Example
https://codesandbox.io/s/charming-jennings-mbfu5?fontsize=14
What is the expected behavior?
shallowEqual
util with 2 different maps should return falseWhich versions of React, ReactDOM/React Native, Redux, and React Redux are you using? Which browser and OS are affected by this issue? Did this work in previous versions of React Redux?
React: v16.8.6
Redux: v7.1.0-alpha.4
The text was updated successfully, but these errors were encountered: