How to dispatch Redux action from stateless component when route is loaded?
I don’t know why you absolutly want a stateless component, while a stateful component with componentDidMount would do the job in a simple way. Dispatching actions in mapDispatchToProps is very dangerous and may lead to dispatching not only on mount but whenever ownProps or store props changes. Side effects are not expected to be done … Read more