redux-formula
v0.1.0
Published
An advanced selectors generator library
Downloads
5
Maintainers
Readme
redux-formula
An alternative way for defining your redux selectors.
import { formulaSelector } from 'redux-formula';
import { connect } from 'react-redux';
const Component = ({ a, b, c }) => (
<span>{a} + {b} = {c}</span>
);
connect(
formulaSelector({
a: '$0.a',
b: '$0.b',
c: { $add: ['$a', '$b'] },
}),
)(Component);