Selectors are functions that take state as a property and return the derived state value. This is because it’s inefficient to recalculate a selector if its input hasn’t fundamentally changed. Selectors can use higher order functions to compose selectors from other selectors. The result of a higher order function is based on the result of the function passed to create a new selector. The new selector will map over all the input functions to determine their results based on their results. The selector library includes additional functionality to memoize selector results.
Companies Mentioned
Nick Scialli
@nas5w
Husband, dog dad, coffee monster. Software engineer at the @usds! Opinions are my own