Skip to content

docs: expand io reference#95147

Merged
aurorascharff merged 5 commits into
canaryfrom
worktree-unstable-io-docs
Jun 25, 2026
Merged

docs: expand io reference#95147
aurorascharff merged 5 commits into
canaryfrom
worktree-unstable-io-docs

Conversation

@icyJoseph

@icyJoseph icyJoseph commented Jun 25, 2026

Copy link
Copy Markdown
Member

Rewrites the io() API reference around what it expresses: with Cache Components await io() keeps the operation that follow afterward out of the static shell.

Adds Server/Client usage examples and a composition note, a "When you don't need io()" section, and reframes the connection() comparison around prefetching.

Adds when-to-use scenarios with a Client Component example,
when-not-to carve-outs, an explicit connection() comparison,
and updates the failure-mode description to match Cache
Components' actual behavior.
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Stats skipped

Commit: 11ac737
View workflow run

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 11ac737

Comment thread docs/01-app/03-api-reference/04-functions/io.mdx Outdated
Comment thread docs/01-app/03-api-reference/04-functions/io.mdx Outdated
Comment thread docs/01-app/03-api-reference/04-functions/io.mdx Outdated
Comment thread docs/01-app/03-api-reference/04-functions/io.mdx Outdated

@aurorascharff aurorascharff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved with comments

@aurorascharff aurorascharff marked this pull request as ready for review June 25, 2026 13:12
Copilot AI review requested due to automatic review settings June 25, 2026 13:12
@aurorascharff aurorascharff marked this pull request as draft June 25, 2026 13:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Expands and reframes the io() API reference and related prerender error docs to clarify that, with Cache Components enabled, await io() (or use(io()) in Client Components) is the mechanism to keep subsequent synchronous dynamic reads out of the static shell, and to better differentiate io() from connection() in terms of prefetch behavior and composability.

Changes:

  • Updates multiple “blocking prerender” error guides to recommend io() as an alternative to connection() with emphasis on static-shell exclusion and prefetch friendliness.
  • Adds “Suspend with use(io())” guidance to Client Component error pages for truly per-visit synchronous reads that can’t be deferred to effects/events.
  • Rewrites the io() reference page with clearer Server/Client usage examples, a “When you don’t need io()” section, and an updated connection() comparison + version history.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
errors/blocking-prerender-random.mdx Reframes io() as the static-shell escape hatch and contrasts prefetch impact vs connection().
errors/blocking-prerender-random-client.mdx Adds a use(io()) Suspense pattern for Client Components that must compute per-visit values during SSR.
errors/blocking-prerender-current-time.mdx Updates the io() alternative explanation consistent with the new framing.
errors/blocking-prerender-current-time-client.mdx Adds a use(io()) Suspense option under “Other options” for per-visit “now” reads.
errors/blocking-prerender-crypto.mdx Updates the io() alternative explanation consistent with the new framing.
errors/blocking-prerender-crypto-client.mdx Adds a use(io()) Suspense pattern for Client Components using crypto.randomUUID() per visit.
docs/01-app/03-api-reference/04-functions/io.mdx Major rewrite of io() reference: static-shell explanation, Server/Client examples, “don’t need io” section, updated connection() comparison, and version history.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@icyJoseph icyJoseph marked this pull request as ready for review June 25, 2026 14:46
@aurorascharff aurorascharff merged commit b0dde9c into canary Jun 25, 2026
68 checks passed
@aurorascharff aurorascharff deleted the worktree-unstable-io-docs branch June 25, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants