/combine-selectors

Converts selectors into getter functions, and combines them into a single generic object

Primary LanguageJavaScriptMIT LicenseMIT

Combine-Selectors

Selectors are deterministic functions that transform state into view-specific structures. This micro-lib converts selectors into getter functions, and combines them into a single generic object.

Install

Using npm:

npm install 'thinkloop/combine-selectors' --save

Or download the latest source of combine-selectors.js.

Use

import combineSelectors from 'combine-selectors';
import { state } from 'todo-redux-state';

import selectedPage from './site/selected-page';
import todos from './todos/todos';

const selectors = {
	selectedPage,
	todos
};

export default combineSelectors(selectors, () => state);

License

Released under an MIT license.

Related

Like it? Star it