rsnext/test/e2e/app-dir/parallel-routes-not-found
Jiachi Liu 4056994304
Recover not found errors from flight data to render with proper boundary (#53703)
### What?

We change the not-found rendering strategy to the origin one which recovers the not found error from the flight data, and hit the error boundary to display the closet not found component.

For parallel `@slot` we shouldn't pass down the not-found boundary, the boundary is only for `@children`.

### Why?

We're having a lot of not-found matching issues that manually searching for not found and layout won't be accurate as we have various scenarios like `(group)` routes, dynamic routes, etc.

### How?

Only render html with empty body so that the error can recover from flight and render the proper not-found component during hydration.

One change for metadata is that we need to get the "not-found" metadata in the initial render, so we'll catch the not-found error once there first and start render the "not-found" metadata and put it in the flight data. Then when it recovers it's still preserved.

Fixes #53694
2023-08-12 08:41:47 +00:00
..
app parallel routes: remove the per-route default 404 handler (#48286) 2023-04-12 13:27:25 +02:00
next.config.js Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
parallel-routes-not-found.test.ts Recover not found errors from flight data to render with proper boundary (#53703) 2023-08-12 08:41:47 +00:00
tsconfig.json Update default moduleResolution in tsconfig.json from node to bundler (#51957) 2023-07-18 15:11:09 +00:00