In a React app, declaring an ErrorBoundary at the root is common, but rarely...


In a React app, declaring an ErrorBoundary at the root is common, but rarely sufficient.

I also wrap routes and page sections in an ErrorBoundary too.

This way, if a page or section fails, the nav still displays. The user can navigate elsewhere, and it feels less jarring.

View original on X