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
Rather then accepting an Array of selector functions accept only a single function
that returns an object. This object may specify multiple keys in order to return
multiple slices of store state.
ref: reduxjs/redux#387
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.
20
+
Where `selector` is a function that takes Redux's entire store state as argument and returns an object that contains the slices of store state that your component is interested in.
23
21
e.g:
24
22
```JS
25
-
state=>state.todos
23
+
state=>({todos:state.todos})
26
24
```
27
25
Note: if you are not familiar with this syntax, go and check out the [MDN Guide on fat arrow functions (ES2015)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions)
0 commit comments