I am trying to write an application that uses a toastr component. However, when I try and dispatch a redux action in this component I get the following console message:
Warning: Cannot update during an existing state transition (such as within
render
or another component's constructor). Render methods should be a pure function of props and state; constructor side-effects are an anti-pattern, but can be moved tocomponentWillMount
.
You can see an example of this in this codesandbox. Particularly, the issue is at the toastr.js component at line 23. Thanks!