Skip to content

Instantly share code, notes, and snippets.

@asbjornenge
Created July 22, 2014 09:38
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 asbjornenge/30e9e85cb208ea544ff8 to your computer and use it in GitHub Desktop.
Save asbjornenge/30e9e85cb208ea544ff8 to your computer and use it in GitHub Desktop.
DirtyIgnoreUnmountedReactMixin
module.exports = {
componentWillMount : function() {
this._replaceState = this.replaceState
this.replaceState = function(completeState, callback) {
if (!this.isMounted()) return
this._replaceState(completeState, callback)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment