react-redux-starter-kit icon indicating copy to clipboard operation
react-redux-starter-kit copied to clipboard

this.props.dispatch NOT working

Open pbhisay opened this issue 8 years ago • 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?

pbhisay avatar Aug 03 '17 15:08 pbhisay