252d9cf453
### What This adds support for navigation signals like `notFound()` and `redirect(url)` when Partial Prerendering has been enabled. ### Why Navigation API's like `notFound()` and `redirect(url)` throw errors in order to interrupt the rendering of components. When a page both invokes API's that cause the render to be marked as dynamic (like `unstable_noStore()`) and also a navigation API, these errors may race to the end. In the case where the navigation error does not beat out the error emitted by dynamic API's will still trigger the detection warning that's present to warn you about situations where you may have accidentally caught the error. ### How This resolves this issue by explicitly checking for navigation signals (errors) thrown during the render, and not displaying the "caught dynamic API" error and console warning. Closes NEXT-2037 |
||
---|---|---|
.. | ||
app | ||
pages | ||
middleware.js | ||
navigation.test.ts | ||
next.config.js |