An error boundary is a component that catches JavaScript errors thrown during rendering in its child tree, shows a fallback UI instead of crashing the whole app, and can log the error.
jsx
{
state = { : };
() {
{ : };
}
() {
(error, info);
}
() {
.. ? : ..;
}
}
<>
</>
