Skip to content

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

License

Notifications You must be signed in to change notification settings

thinkloop/combine-selectors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published