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
Where selector is a function taking for single argument the entire redux Store's state (a plain JS object) and returns another object, which is the slice of the state that your component is interested in.
@@ -28,6 +29,9 @@ If you haven't, check out [reselect](https://github.com/faassen/reselect), an aw
28
29
29
30
This returned object will be passed as argument to the callback provided whenever the state changes.
30
31
ngRedux checks for shallow equality of the state's selected slice whenever the Store is updated, and will call the callback only if there is a change.
32
+
##### Important: It is assumed that you never mutate your states, if you do mutate them, ng-redux will not execute the callback properly.
33
+
See [Redux's doc](http://gaearon.github.io/redux/docs/basics/Reducers.html) to understand why you should not mutate your states.
34
+
If you have a good reason to mutate your states, you can still [disable caching](#Disable-caching) altogether.
Each time Redux's Store update, ng-redux will check if the slices specified via 'selectors' have changed, and if so will execute the provided callback.
127
+
You can disable this behaviour, and force the callback to be executed even if the slices didn't change by setting ```disableCaching``` to true:
0 commit comments