Skip to content

Fix useId on streamed Suspense retries - #507

Merged
JoviDeCroock merged 2 commits into
mainfrom
fix/streaming-use-id-retries
Nov 23, 2026
Merged

JoviDeCroock merged 2 commits into
mainfrom
fix/streaming-use-id-retries

Conversation

@JoviDeCroock

@JoviDeCroock JoviDeCroock commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Reset the boundary’s useId counter before a streaming retry, and render a fallback with its boundary’s counter so its ids don't shift the ids after the boundary. The stream tests accept both Preact 10 and 11 ids.

Authored by an LLM (OpenAI, Anthropic).

@changeset-bot

changeset-bot Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7427d26

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

This PR includes changesets to release 1 package
Name Type
preact-render-to-string 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

A fallback rendered under the boundary's parent took ids from the outer
counter, shifting the ids after the boundary away from the client's.
The useId tests now assert the Preact 10 and 11 ids explicitly.
@JoviDeCroock
JoviDeCroock merged commit 8d8dad3 into main Nov 23, 2026
1 check passed
@JoviDeCroock
JoviDeCroock deleted the fix/streaming-use-id-retries branch November 23, 2026 06:59
@github-actions github-actions Bot mentioned this pull request Nov 23, 2026
MaxwellCohen added a commit to MaxwellCohen/preact-render-to-string that referenced this pull request Nov 29, 2026
Co-Authored-By: Claude Opus 5.5
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