Building effective Error Boundaries in React.

Fay McInteer
Geek Culture
Published in
5 min readFeb 4, 2022

--

Photo by Matt Hudson on Unsplash

Error Boundaries were introduced in React 16, as a tool to capture errors that otherwise would bubble up to crash the entire app. We can wrap these errors in a fallback UI that provides some useful feedback to the user of what may have gone wrong, or at the very least a way out of the current error such as a page reload or link elsewhere.

--

--

Fay McInteer
Geek Culture

𝕃𝕖𝕒𝕕 𝔽𝕣𝕠𝕟𝕥𝕖𝕟𝕕 𝔻𝕖𝕧𝕖𝕝𝕠𝕡𝕖𝕣 𝕒𝕥 𝕌𝕡𝕤𝕥𝕠𝕔𝕜. I write about tech, productivity and being a working mum.