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
Is it possible to configure a deep-equality check that we can pass either like provide(store, isEqual) or @connect(state => state.todos, todoActions, isEqual) where isEqual could our custom equality check function, that could override the default shallow-equal check. This is done in this other redux-watch basic one - https://github.com/ExodusMovement/redux-watch#note-on-comparisons
I would probably have lodash isEqual imported in my app, and pass it, and get more accurate "updated" triggerred in my class.
Thank you!
The text was updated successfully, but these errors were encountered:
Note "keeping the same references to the objects that haven't changed" in the above extract. So, wouldn't a simple shallow comparison (!==) be enough (link below with Dan's snippet) to trigger the "updated" event for the "connected" sub-state in my class, instead of the shallow-equality check adopted in helpers.js?
I'm wondering if the shallow-compare is there primarily to support "connecting" to multiple state objects? I did create another issue regarding connecting to multiple state object (#17), but wondering if it's related to shallow-compare discussed in this issue?
Referring to https://github.com/davej/js-redux/blob/master/src/helpers.js#L3
Is it possible to configure a deep-equality check that we can pass either like
provide(store, isEqual)
or@connect(state => state.todos, todoActions, isEqual)
where isEqual could our custom equality check function, that could override the default shallow-equal check. This is done in this other redux-watch basic one - https://github.com/ExodusMovement/redux-watch#note-on-comparisonsI would probably have lodash isEqual imported in my app, and pass it, and get more accurate "updated" triggerred in my class.
Thank you!
The text was updated successfully, but these errors were encountered: