Adds a global action middleware to be run when an action is performed. It is usually preferable to use onActionMiddleware instead to limit it to a given tree and only to topmost level actions or actionTrackingMiddleware for a simplified middleware.
onActionMiddleware
actionTrackingMiddleware
Action middleware to be run.
A disposer to cancel the middleware. Note that if you don't plan to do an early disposal of the middleware calling this function becomes optional.
Adds a global action middleware to be run when an action is performed. It is usually preferable to use
onActionMiddleware
instead to limit it to a given tree and only to topmost level actions oractionTrackingMiddleware
for a simplified middleware.