-
Notifications
You must be signed in to change notification settings - Fork 47.1k
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
Bug: use() causes nested Suspense boundaries to not reveal #25813
Comments
on ArtistPage.js I swapped out
with
and got the desired outcome. Is this what you were looking for? |
It's still a bug though. |
From my interpretation of the documentation suspense requires components to be imported dynamically, which is what lazy loading accomplishes. from the docs: https://beta.reactjs.org/apis/react/Suspense
So I'm not really certain how to go about resolving this issue. I'm not saying you're wrong about it being a bug, but it's unclear to me where the issue lies. I'll update this thread if I think of / find anything though. |
@sachin-hg This issue isn't about re-rendering. It's about Suspense boundaries failing to reveal. I believe this bug was specific to As for #19870, I'm not sure it's a bug because suspending on a Promise created during render (which will be new every time until first mount even if you put it into state) is not supported. So I'm not sure what you were hitting, but #19870 is not a legitimate way to use React. If you have a different problem, please file a new issue with an example. |
This is fixed in main. |
Nested Suspense boundaries should reveal as the content becomes ready. However, this doesn't seem to work with
use
.Repro case: https://codesandbox.io/embed/festive-archimedes-sihgkb?file=/ArtistPage.js:338-346
Expected: Suspense boundaries reveal separately
Actual: it waits for everything before revealing anything
The text was updated successfully, but these errors were encountered: