@@ -153,7 +153,7 @@ For example, a nested route with two segments that both include `layout.js` and
...
@@ -153,7 +153,7 @@ For example, a nested route with two segments that both include `layout.js` and
The nested component hierarchy has implications for the behavior of `error.js` files across a nested route:
The nested component hierarchy has implications for the behavior of `error.js` files across a nested route:
- Errors bubble up to the nearest parent error boundary. This means an `error.js` file will handle errors for all its nested child segments. More or less granular error UI can be achieved by placing `error.js` files at different levels in the nested folders of a route.
- Errors bubble up to the nearest parent error boundary. This means an `error.js` file will handle errors for all its nested child segments. More or less granular error UI can be achieved by placing `error.js` files at different levels in the nested folders of a route.
- An `error.js` boundary will **not** handle errors thrown in a `layout.js` component in the **same** segment because the error boundary is nested **inside** that layouts component.
- An `error.js` boundary will **not** handle errors thrown in a `layout.js` component in the **same** segment because the error boundary is nested **inside** that layout's component.