-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
As called out in reduxjs/react-redux#2263
Rather than supporting isEqual directly I'd like to explore passing the selector the current and previous values. This would allow libraries like Relay to implement recycleNodesInto which allows selectors which are pure functions to end up returning objects which implement structural sharing, which is important for keeping memoization in React happy. (Example, your selector returns a nested object and a state change causes you to return a new top level field, but the nested items have all the same values. This allows you to keep stable object identity for those nested objects.
I think this can be used to implement a custom isEqual.
Metadata
Metadata
Assignees
Labels
No labels