Created
May 19, 2020 01:42
-
-
Save owenconti/f9194d3c093d4443517c6f9dd2a5b163 to your computer and use it in GitHub Desktop.
React error boundaries
This file contains hidden or 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
| function SomeComponent() { | |
| return ( | |
| <CustomErrorCatcher> | |
| {invalidVariable} | |
| </CustomerErrorCatcher> | |
| ); | |
| } |
This file contains hidden or 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
| function Root() { | |
| return ( | |
| <CustomErrorCatcher> | |
| <App /> | |
| </CustomErrorCatcher> | |
| ); | |
| } | |
| ReactDom.render(<Root />, document.getElementById('app')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment