Redux Middleware - Alwynblake/seattle-javascript-401n12 GitHub Wiki
Redux Middleware
-
middleware can be used for a variety of things --It provides a third-party extension point between dispatching an action, and the moment it reaches the reducer.People use Redux middleware for logging, crash reporting, talking to an asynchronous API, routing, and more.
-
One of the benefits of Redux is that it makes state changes predictable and transparent. Every time an action is dispatched, the new state is computed and saved. The state cannot change by itself, it can only change as a consequence of a specific action. When something goes wrong, we can look back at our log, and figure out which action corrupted the state.
-
See examples on how to execute redux middleware: https://redux.js.org/advanced/middleware