Chapter 16 · Example 2 · Universal error handling in React

Errors in children components

A try/catch around a child element cannot catch errors inside it, since rendering an element only creates a definition that React executes later, after the block runs.

Loading live editor…