Skip to content

Instantly share code, notes, and snippets.

@aibolik
Created March 22, 2021 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aibolik/3cf91b4e49d3e633f6180e2780357435 to your computer and use it in GitHub Desktop.
Save aibolik/3cf91b4e49d3e633f6180e2780357435 to your computer and use it in GitHub Desktop.
const logger = (storeApi) => (next) => (action) => {
console.log(`\n[debug] [redux] action: ${action.type}`);
try {
console.log(`[debug] [redux] action body: ${JSON.stringify(action)}\n`);
} catch {
}
next(action);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment