A “selector” is any function that accepts the Redux state tree as an argument, and returns some extracted or derived data. That includes plain functions like you showed.
In many cases, you want to memoize the calculation of the results, such as mapping over an array of items, so that it’s not re-calculated unless the inputs have changed. Reselect’s createSelector
creates memoized selector functions that only recalculate the output if the inputs change.
For more details, see my post Using Reselect Selectors for Encapsulation and Performance , as well as the “Performance and Normalizing Data” page in the new “Redux Essentials” core docs tutorial.