Skip to content
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

RSC: Add comment explaining use() #10411

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented Apr 4, 2024

// `use()` will throw a `SuspenseException` as long as `dataToReturn` is
// unfulfilled. React internally tracks this promise and re-renders this
// component when the promise resolves. When the promise is resolved no
// exception will be thrown and the actual value of the promise will be
// returned instead
// The closest suspense boundary will render its fallback when the
// exception is thrown

@Tobbe Tobbe added the release:chore This PR is a chore (means nothing for users) label Apr 4, 2024
@Tobbe Tobbe added this to the RSC milestone Apr 4, 2024
@Tobbe Tobbe changed the title Add comment explaining use() RSC: Add comment explaining use() Apr 4, 2024
@Tobbe Tobbe added the changesets-ok Override the changesets check label Apr 4, 2024
@Tobbe Tobbe merged commit 6ff2e3e into redwoodjs:main Apr 4, 2024
53 of 59 checks passed
@Tobbe Tobbe deleted the tobbe-rsc-explain-use-hook branch April 4, 2024 08:29
@Josh-Walker-GM Josh-Walker-GM modified the milestones: RSC, v8.0.0 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changesets-ok Override the changesets check release:chore This PR is a chore (means nothing for users)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants