In my reactjs-universal component I wrote this:
const mapStateToProps = (store) => {
return {
cars: store
}
}
export default connect(mapStateToProps)(SearchForm)
In the same component I would like to dispatch an action like :
store.dispatch({type: 'SHOWDETAIL', data: 'hi'});
When this is run I get:
Uncaught TypeError: _create2.default.dispatch is not a function
Is it possible to get a reference to the store somehow in my component so I can dispatch the action?