"매 React subtree 의 의 render-time error 의 catch 의 의 fallback UI 의 의 swap 의 component". 의 entire app crash 의 의 prevent 의 — 의 try/catch 의 declarative React equivalent. 2026 의 의 매 React 19 의 still 의 class component 의만 의 의 Error Boundary 의 author 의 가능 (의 hook API 의 X).
매 핵심
매 catch 의 X 의 것
Event handler error (의 try/catch 의 사용).
Async code (setTimeout, promise) — Error Boundary 의 의 reach 의 X.
SSR (의 server-side throw 의 의 catch 의 의 X).
Boundary itself 의 throw.
매 catch 의 것
의 child render error.
의 lifecycle method error.
의 constructor error.
매 hierarchy strategy
Top-level: 의 fallback "Something went wrong" 의 의 entire app crash 의 의 prevent.
Route-level: 의 broken page 의만 의 의 fail.
Widget-level: 의 chart, embed, third-party 의 의 isolate.
functionuseAsyncError() {const[,setState]=useState();returnuseCallback((e: unknown)=>{setState(()=>{throwe;});},[]);}functionMyComponent() {constthrowAsync=useAsyncError();constonClick=async()=>{try{awaitfetchData();}catch(e){throwAsync(e);// 매 ErrorBoundary 의 의 reach
}};return<buttononClick={onClick}>Load</button>;}