concept logger middleware in category react
appears as: logger middleware

This is an excerpt from Manning's book Redux in Action.
Open index.js, import the logger, and add it to the argument list for applyMiddleware alongside thunk, as shown in listing 5.2. Whenever you want to add a new middleware to your applications, you’ll follow this process. Note that you add the logger middleware last, and they run in the order that you pass them to applyMiddleware. It’s not critical in this case, that the middleware be in any particular order, but you should be aware of the significance of their order.
Listing 5.2. Adding the logger middleware to the store – src/index.js
... import logger from './middleware/logger'; #1 ... const store = createStore( rootReducer, composeWithDevTools(applyMiddleware(thunk, logger)), #2 ); ... #1 Imports the newly created middleware #2 Registers the logger middleware with the store !@%STYLE%@! {"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":1,\"ch\":65},{\"line\":1,\"ch\":67}],[{\"line\":11,\"ch\":0},{\"line\":11,\"ch\":2}],[{\"line\":6,\"ch\":63},{\"line\":6,\"ch\":65}],[{\"line\":12,\"ch\":0},{\"line\":12,\"ch\":2}]]"} !@%STYLE%@!