Skip to content

Instantly share code, notes, and snippets.

@Jahans3
Last active December 1, 2018 00:15
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 Jahans3/2227d51453db444ffd7025950004b25d to your computer and use it in GitHub Desktop.
Save Jahans3/2227d51453db444ffd7025950004b25d to your computer and use it in GitHub Desktop.
Count middleware
function countMiddleware ({ type, payload }, { count }) {
if (type === ADD_N) {
console.log(`${payload} + ${count} = ${payload + count}`);
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment