createSelector
createSelector is a factory function, most commonly associated with the Reselect library for JavaScript, that produces memoized selector functions used to derive computed data from application state. A selector created by createSelector receives the application state (and optionally props), runs one or more input selector functions to extract pieces of state, and then applies a result function to those inputs to produce a derived value. The result is recomputed only when an input value changes, using a shallow equality check by default.
Typical usage is in Redux-based applications to compute filtered, aggregated, or transformed data for components without
Benefits include avoiding unnecessary recomputation, keeping selectors pure and testable, and improving rendering performance when used