Repository navigation
docs: lead query docs with .suspend(), hydrate() as the alternative - #2
Merged
Merged
Conversation
…native Show .suspend() inside <Suspense> with useServerInsertedHTML on the provider first, then .load() for client-only loading, and reduce hydrate() to the fallback for reads that cannot run during SSR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rInsertedHTML Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rtedHTML Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
core/README.md"Queries and Next.js" leads with.suspend(arg)inside<Suspense>, withuseServerInsertedHTMLonComwitProvider. Then.load(arg)covers client-only loading.hydrate()is described as the SSR alternative for frameworks whose provider has nouseServerInsertedHTML. There, the server response cannot reach the client cache, so client navigation requests it again. Next.js does not need it..suspend()and theuseServerInsertedHTMLprop. This covers theprovider.tsxJSDoc,@experimentalon thesuspendtypes, internal accessor comments, and type-test comments. There is no runtime change.Docs only (plus JSDoc/comments). The site counterpart is comwit/comwit#156. The parent
packages/stategitlink bump follows in a separate PR after this merges.Verification
tsc -p tsconfig.type-tests.json --noEmitpasses.🤖 Generated with Claude Code