Skip to content

Instantly share code, notes, and snippets.

@jgcmarins
Created June 29, 2017 15:27
Show Gist options
  • Save jgcmarins/cb2d92c4b4bb87fa1540893f9deda450 to your computer and use it in GitHub Desktop.
Save jgcmarins/cb2d92c4b4bb87fa1540893f9deda450 to your computer and use it in GitHub Desktop.
When I'm not in redux, I miss logger middleware + actions
const setState = Component.prototype.setState
Component.prototype.setState = function(nextState) {
console.log(this.constructor.name, nextState)
return setState.apply(this, arguments)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment