Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

this.props.dispatch NOT working #1323

Open
pbhisay opened this issue Aug 3, 2017 · 0 comments
Open

this.props.dispatch NOT working #1323

pbhisay opened this issue Aug 3, 2017 · 0 comments

Comments

@pbhisay
Copy link

pbhisay commented Aug 3, 2017

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant