dvdzkwsk/react-redux-starter-kit

this.props.dispatch NOT working

pbhisay opened this issue · 0 comments

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?