Different behaviour when use `actions.add()` and `toastr.success()`
See original GitHub issueThe problem:
When I use actions
instead of regular toastr
I can’t use default options which automatically added here
https://github.com/diegoddox/react-redux-toastr/blob/master/src/toastrEmitter.js#L5
https://github.com/diegoddox/react-redux-toastr/blob/master/src/utils.js#L65
and in this case I lost some features like creating timeout again when mouse leave here https://github.com/diegoddox/react-redux-toastr/blob/master/src/ToastrBox.js#L112-L122
you may notice that when I use actions.add()
I have to set all defaults myself because function add
just forwards payload to action
https://github.com/diegoddox/react-redux-toastr/blob/master/src/actions.js#L25
As a result I can’t use any of default options on actions.
So I’d suggest you to add some function which add default values for it before forward it to action creator.
here is an example I used for demo
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5 (3 by maintainers)
Hi @frankrod I didn’t have the time to fix yet
do it to inactivity, will close.