0.0.2 • Published 4 years ago
useful-selectors v0.0.2
useful-selectors
Collection of utility selectors
Install
npm install useful-selectors
createMemoSelector
createMemoSelector(state => state.domain, ["foo", "bar"]);
// Will check only specified properties of output object
createIdentitySelector
createIdentitySelector(state => state.domain);
// Will be executed once, on next calls will return same object
createArraySelector
createArraySelector(state => Object.keys(state.todosById));
// Will compare output array with previous value, returning same instance if nothing changed