0.0.3 • Published 6 years ago

react-with-redux v0.0.3

Weekly downloads
2
License
ISC
Repository
-
Last release
6 years ago

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