Open jcheroske opened 8 years ago
Just learned you can't use backticks in the title. Good to know.
Feel free to submit a PR for this! I agree that it shouldn't assume the application is using thunks.
@jcheroske, what is the workaround you found if you're using redux saga?
If you are not using thunks
you can instead of:
dispatch(
notifSend({
message: 'Message success',
kind: 'info',
dismissAfter: 2000
})
);
do:
notifSend({
message: 'Message success',
kind: 'info',
dismissAfter: 2000
})(dispatch);
@simutis Thanks, that worked great!
The documentation shows the usage as:
which seems to indicate that
notifSend
is returning an action object, but it actually returns a thunk. This is problematic for two reasons:I feel that
notifSend
should return a simple action object, or another function should be added to the api the does just that.