એક error boundary એ એક component છે જે rendering દરમિયાન તેના child tree માં ફેંકવામાં આવેલ JavaScript errors ને પકડે છે, સમગ્ર app ને ક્રેશ થતા રોકવાને બદલે fallback UI દર્શાવે છે, અને error ને log કરી શકે છે.
jsx
{
state = { : };
() {
{ : };
}
() {
(error, info);
}
() {
.. ? : ..;
}
}
<>
</>
