Is it possible to create an error notification in a redux Middleware ?
In my case I work with a Middleware catching the ParameterChangeAction (action responsible for changing filters on a Overview).
I’m requested to make one of our filters mandatory.
From the documentation:
By dispatching add action (NotificationActions.add) the notification will be displayed in your application. By dispatching remove action (NotificationActions.remove) the notification will be removed.
Of course, you can do this in a redux middleware as well since the middleware API allows you to dispatch arbitrary actions.
If you provide the activity id in the action payload as well, the notification will be bound to the lifetime of the respective activity. That is, if you cancel the activity, the notification will be automatically removed.