dvdzkwsk / react-redux-starter-kit

Get started with React, Redux, and React-Router.
MIT License
10.28k stars 2.2k forks source link

this.props.dispatch NOT working #1323

Open pbhisay opened 7 years ago

pbhisay commented 7 years ago

Hi,

I'm using decorators to connect the store like below:

@connect((store) => {
  return {
    param1 : store.myReducer.param1,
    param2 : store.myReducer.param2,
    param3 : store.myReducer.param3,
    param4 : store.myReducer.param4,
  }
})

In my component, when I try to fire an action like below: this.props.dispatch(myAction(this.state.param1, this.state.param2))

it throw this error in the browser console: Uncaught TypeError this.props.dispatch is not a function

Can someone help me understand what's going on?