A quick background, I was working on a React-Redux app using an older version of this boiler plate project.
However, it had some issues going forward so I ported my code to the latest version of the same boiler plate project (did it yesterday).
So the issue I had before got resolved. The UI is loading and everything looks great, but when Button.onTouchTap() gets fired, it's throwing an error like below:
Uncaught TypeError this.props.dispatch is not a function
This was working fine before without any problems, not sure what's breaking it. :(
In my component, I use decorators to connect to the store, not mapStateToProps method (which is commonly the root of this problem afaik).
@connect((store) => {
return {
param1 : store.myReducer.param1,
param2 : store.myReducer.param2,
param3 : store.myReducer.param3,
param4 : store.myReducer.param4,
}
})
The error is getting thrown at the line below:
this.props.dispatch(myAction(this.state.param1, this.state.param2))
I'm totally confused and have been caught on this for a long time. Any help is appreciated, thanks! <3
dispatchin props?