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