A high order component for binding to reflux stores.
Install
npm install --save reflux-provides-store
Usage
providesStore
is a function that takes a store and returns a function that takes a component.
This works well with decorators, but can be used like Component = providesStore(Store)(Component)
for any component.
You specify the prop name by using propTypes as shown below.
Example
;;;;; @Component static propTypes = users: providesStore userId: PropTypesstringisRequired ; { if !thispropsusersnextPropsuserId Users; } { if !thispropsusersthispropsuserId Users; } { var user = thispropsusersthispropsuserId; if !user return null; return <UserDetails user=user /> ; }