Sha256: 0b596100d9fbea9611d92b371be15bcf0ac5d73fcd75da41950096dc218324d7
Contents?: true
Size: 670 Bytes
Versions: 22
Compression:
Stored size: 670 Bytes
Contents
/* eslint no-console: 0 */ // This logger should be configured not to run in a production environment. // See https://github.com/petehunt/webpack-howto#6-feature-flags for you might turn this off for production. export default function logger({ getState }) { return next => action => { console.log('will dispatch', action); // Call the next dispatch method in the middleware chain. const result = next(action); const immutableState = getState(); console.log('state after dispatch', JSON.stringify(immutableState)); // This will likely be the action itself, unless // a middleware further in chain changed it. return result; }; }
Version data entries
22 entries across 22 versions & 1 rubygems