react-redux-connectme

1.0.2 • Public • Published

react-redux-connectme

How to use

npm install react-redux-connectme --save

In your react index file

import * as actionsCreators from './actions/actionCreators'
import { addActionCreators } from 'react-redux-connectme'
 
addActionCreators(actionsCreators)

And in all you components that use redux state

import connect from 'react-redux-connectme'
 
class App extends Component {
 
  render() {
    return (
      <div
        onClick={this.props.someActionFunction}
      >
        {this.props.someData}
      </div>
    )
  }
}
 
export default connect(App, (state) => ({
  // add state to connect here, ex:
  someData: state.someData,
  someActionFuncion: state.someActionFunction,
}))
 

Package Sidebar

Install

npm i react-redux-connectme

Weekly Downloads

1

Version

1.0.2

License

ISC

Last publish

Collaborators

  • richie_south