-
Writing an Error Boundary
Errors can happen in React components for many reasons. In development mode, errors will cause React to spit up a bunch of red text into the browser. This is sometimes helpful for debugging the problem. In production mode, React will display a white screen (called the “white screen of death”) rather than report to the…