Repository navigation
Conversation
A primitive that skips its effects on the server leaves the browser ahead in the hydration id sequence, so every element after it misses its key and stays dead after hydration (solidjs/solid#5226, #5245). Add a section to the SSR-safe code guide with the avoid/prefer shape, point the key-miss warning and a new common problem at it, and stop suggesting an isServer guard in the custom primitives troubleshooting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0117BoWMR7ndYUnqBW5NjTbC
|
|
✅ Deploy Preview for solid-docs-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description(required)
A primitive that returns early on
isServerbefore creating its effects leaves the browser ahead in the hydration id sequence. Every computation takes the next id of its owner, and the server reserves the same ids even for effects it never runs. Every element rendered after the primitive then misses its key: the browser builds a detached copy with the handlers, and the server's copy stays on the page with none, silently in production.This was found in solidjs/solid#5226, and solidjs/solid#5245 proposed adding the advice to the dev key-miss warning. It belongs in the docs instead, so this PR:
Hydration key missexplanation at it, and adds a common problem, "A button renders but does nothing after hydration"isServer, to point at the new section insteadpnpm lint:toneand Prettier pass. The one tone warning is pre-existing, in a generated reference page.Related issues & labels
Generated by Claude Code