-
-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(react-router): do not wrap children in outlet in suspense unless (default)pendingComponent is configured #2035
base: main
Are you sure you want to change the base?
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit bc81168. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution
✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
1f62d54
to
16a42fd
Compare
This comment was marked as resolved.
This comment was marked as resolved.
it maybe solves #2026 |
Whoops, my bad, linked the wrong issue. |
@tannerlinsley please have a look if omitting this suspense is ok, check #2026 for the motivation. one thing I dislike is that there is no way to opt out of suspense here if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one thing I dislike is that there is no way to opt out of suspense here if defaultPendingComponent is set.
This could be changed so that we don't use the defaultPendingComponent
for the rootRoute
and only rely on the rootRoute.pendingComponent
. So if PendingComponent===undefined
then just return nextMatch
.
The only issue here is that this could be a breaking change for anyone currently relying on that default behaviour of not requiring a Suspense boundary above the RouterProvider.
We can ofc, get around this by introducing a future flag and stuff this new behaviour under that flag (and remove the old behaviour in v2).
Is there anything I can do to move this along? |
…ng Outlet in Suspense
…efaultPendingComponent are configured
3518ac3
to
bc81168
Compare
No description provided.