Last active
February 24, 2016 01:51
-
-
Save belmer/2f9746de239130bfcda8 to your computer and use it in GitHub Desktop.
React debug setState() warning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Paste this on your browser console and navigate to routes without refreshing your browser. | |
Once this is inplace whenever you get Warning on setState() it should give you the stack trace. | |
var warn = console.warn; | |
console.warn = function(warning) { | |
if (/(setState)/.test(warning)) { | |
throw new Error(warning); | |
} | |
warn.apply(console, arguments); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment