Describe the bug
A route wrapped in Suspense either by setting the prop wrapInSuspense to true or defining a pendingComponent doesn't render the notFoundComponent or the defaultNotFoundComopnent when the notFound function is thrown in the loader.
Your Example Website or App
https://codesandbox.io/p/devbox/beautiful-archimedes-7vwmwj
Steps to Reproduce the Bug or Issue
To reproduce :
- Go to index route
Loading is rendered instead of Not found
Things that doesn't trigger the bug :
- There is no Promise in the loader or the Promise is faster
- The prop
wrapInSuspense is set to false
- The prop
pendingComponent is not set
Expected behavior
The prop notFoundComponent should be rendered when the notFound function is thrown in the loader even if the route is wrapped in Suspense and the Promise is taking longer to resolve.
Screenshots or Videos
No response
Platform
- OS: Windows
- Browser: Chrome
- Version: 124
Additional context
No response
Describe the bug
A route wrapped in
Suspenseeither by setting the propwrapInSuspensetotrueor defining apendingComponentdoesn't render thenotFoundComponentor thedefaultNotFoundComopnentwhen thenotFoundfunction is thrown in the loader.Your Example Website or App
https://codesandbox.io/p/devbox/beautiful-archimedes-7vwmwj
Steps to Reproduce the Bug or Issue
To reproduce :
Loadingis rendered instead ofNot foundThings that doesn't trigger the bug :
wrapInSuspenseis set tofalsependingComponentis not setExpected behavior
The prop
notFoundComponentshould be rendered when thenotFoundfunction is thrown in the loader even if the route is wrapped inSuspenseand the Promise is taking longer to resolve.Screenshots or Videos
No response
Platform
Additional context
No response