Last active
December 13, 2016 18:47
-
-
Save louisptremblay/69341fe9cc8ccfc4cc8254c83c45d34c to your computer and use it in GitHub Desktop.
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
// When getting error: "Cannot read property 'componentWillUnmount' of null" | |
// It's because React is swallowing the exception without rethrowing it | |
// In ReactCompositeComponent.js, edit lines that look like this, and add the Catch part | |
if (canInstantiate) { | |
if (process.env.NODE_ENV !== 'production') { | |
ReactCurrentOwner.current = this; | |
try { | |
inst = new Component(publicProps, publicContext, ReactUpdateQueue); | |
} catch (ex) { | |
console.log(ex); | |
debugger; | |
} finally { | |
ReactCurrentOwner.current = null; | |
} | |
} else { | |
inst = new Component(publicProps, publicContext, ReactUpdateQueue); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment