August 2017
Beginner
374 pages
10h 41m
English
Edit src/middleware/logger.js and define the logging middleware:
const logger = store => next => action => {
if (console.group) console.group(action.type)
console.info('dispatching', action)
const result = next(action)
console.log('new state', store.getState())
if (console.groupEnd) console.groupEnd(action.type) return result}
Read now
Unlock full access