Skip to content

Commit

Permalink
Use JSON.stringify in loggerMiddlware
Browse files Browse the repository at this point in the history
  • Loading branch information
robwise committed Nov 6, 2015
1 parent f50b5c0 commit 613f0d9
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ export default function logger({ getState }) {
const nextAction = next(action);

const immutableState = getState();
const readableState = _.reduce(immutableState, (result, immutableItem, key) => {
result[key] = immutableItem.toJS();
return result;
}, {});

console.log('state after dispatch', readableState);
console.log('state after dispatch', JSON.stringify(immutableState));

// This will likely be the action itself, unless
// a middleware further in chain changed it.
Expand Down

0 comments on commit 613f0d9

Please sign in to comment.