エラーバウンダリとは?
エラーバウンダリとは、UI ツリーの一部を包み、その子孫のレンダリング中に投げられたエラーを捕捉するコンポーネントです。エラーが上へ伝播してインターフェース全体をアンマウントさせる代わりに、バウンダリはフォールバックのビューをレンダリングします。障害を隔離し、壊れた一つのセクションがページ全体を落とさないようにします。
なぜ重要か
エラーバウンダリは、単一コンポーネントの障害が app を白くするのを防ぎ、残りの体験を保ちます。エラーレポートと組み合わせると、根底にあるバグを修正のために表面化させます。
関連ガイド
What Is an Error Retry Boundary?An error retry boundary catches a failed UI region and offers a retry action, letting the user re-run the ope…
What Is a Suspense Boundary?A suspense boundary wraps part of a UI so that while its data or code is loading, a fallback is shown, lettin…
What Is Source Map Upload?Source map upload is the CI step that sends build source maps to an error-tracking service so minified produc…