react-with-redux
v0.0.3
Published
Access to a redux store through a render prop
Downloads
7
Readme
Use
import WithRedux from 'react-with-redux';
import {pullThings,selectThing} from 'actions';
export default () => (
<WithRedux onMountDispatch={pullThings}>
{(state,dispatch)=>(
state.things.map(t => (
<a onClick={() => dispatch(selectThing(t.id))}> {t.name} </a>
))
)}
</WithRedux>
)
Props
onMountDispatch<Function>
An action creator to be dispatched onDidMount