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

feat: support fast suspense children #52

Merged
merged 12 commits into from
Feb 19, 2024

Conversation

bholmesdev
Copy link
Owner

@bholmesdev bholmesdev commented Feb 18, 2024

Update simple-stack-stream to wait on parent content before sending nested suspense results. This ensures the parent has rendered in the browser before nested suspense boundaries try to render.

  • Add AsyncLocalStorage to track parent suspense boundaries from suspend()
  • Add parent <> child relationship tracking to "flush" child content into their parent when the child resolves faster than the parent.
  • Misc: refactor handling of fast or synchronous Suspense content. Rather than handling this in-line with a thenable, handle from the middleware and return to the Suspense component.
    • Related: remove utilities to track promises

Copy link

changeset-bot bot commented Feb 18, 2024

🦋 Changeset detected

Latest commit: 6a526e1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
simple-stack-stream Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Feb 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
simple-stack-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2024 5:30pm

@bholmesdev bholmesdev merged commit 65601e5 into main Feb 19, 2024
3 checks passed
@github-actions github-actions bot mentioned this pull request Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant