fynx-decorators
v1.0.0
Published
Fynx decorators for class-based React components.
Maintainers
Readme
Fynx is an architecture library for React. The fynx-decorators module provides store decorators for class-based React components.
Install
With NPM
npm install fynx-decoratorsWith Bower
bower install fynx-decoratorsFrom source
git clone https://github.com/foss-haas/fynx-decorators.git
cd fynx-decorators
npm install
npm run distAPI
connect(store, name):Decorator
Creates a React decorator that updates the component's props by setting the prop identified by name to the store's value whenever the store's value changes.
Automatically adds the store's current value to the component's initial props.
Registers the listener on componentDidMount and unregisters it on componentWillUnmount.
connectProp(propName, name):Decorator
Creates a React decorator that updates the component's props by setting the prop identified by name to the value of the store in the outer prop propName whenever the store's value changes.
Automatically adds the store's current value to the component's initial props and reacts to outer prop changes.
Registers the listener on componentDidMount and unregisters it on componentWillUnmount.
License
The MIT/Expat license. For more information, see http://foss-haas.mit-license.org/ or the accompanying LICENSE file.

