Skip to content

docs(framework/react/guides): replace deprecated 'isServer' with 'environmentManager.isServer()'#10866

Merged
sukvvon merged 1 commit into
mainfrom
docs/react-guides-replace-deprecated-is-server
Jun 3, 2026
Merged

docs(framework/react/guides): replace deprecated 'isServer' with 'environmentManager.isServer()'#10866
sukvvon merged 1 commit into
mainfrom
docs/react-guides-replace-deprecated-is-server

Conversation

@sukvvon
Copy link
Copy Markdown
Collaborator

@sukvvon sukvvon commented Jun 3, 2026

🎯 Changes

Replaces the deprecated isServer import with environmentManager.isServer() in the React SSR guides, matching the recommended API used elsewhere in the codebase.

  • docs/framework/react/guides/suspense.md: the streamed hydration provider example
  • docs/framework/react/guides/advanced-ssr.md: the three getQueryClient() examples (providers, get-query-client.ts, and the streamed hydration provider)

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Documentation
    • Updated React Query + Next.js Server Components and Suspense documentation with improved code examples for enhanced server-environment detection patterns.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dfac330b-c57d-41a6-b800-6a9a8dfa856e

📥 Commits

Reviewing files that changed from the base of the PR and between 2702b34 and 1fa5f29.

📒 Files selected for processing (2)
  • docs/framework/react/guides/advanced-ssr.md
  • docs/framework/react/guides/suspense.md

📝 Walkthrough

Walkthrough

Documentation code examples in React Query's advanced SSR and Suspense guides are updated to use environmentManager.isServer() for server-vs-browser detection instead of a deprecated isServer flag. This change appears across six code snippets in two guide files.

Changes

Documentation Migration to environmentManager API

Layer / File(s) Summary
Advanced SSR guide snippets
docs/framework/react/guides/advanced-ssr.md
Three code snippet sections (Providers setup, app/get-query-client.ts, and experimental ReactQueryStreamedHydration provider) updated to import and branch on environmentManager.isServer() instead of isServer.
Suspense streaming guide snippet
docs/framework/react/guides/suspense.md
Server streaming example code block updated to import environmentManager and branch on environmentManager.isServer() instead of the isServer flag.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • TanStack/query#10826: Replaces deprecated isServer flag with environmentManager.isServer() in Vue Query integration code/snippets.
  • TanStack/query#10857: Updates the same React Query Next.js Server Components examples to use environmentManager.isServer() instead of isServer flag.
  • TanStack/query#10860: Updates Next.js React Query example server logic to replace deprecated isServer flag with environmentManager.isServer() inside getQueryClient setups.

Suggested reviewers

  • TkDodo

Poem

🐰 A docs update hops so clean,
From isServer to the machine—
environmentManager now knows the way,
Server or browser, either day! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: replacing deprecated 'isServer' with 'environmentManager.isServer()' in React framework guides.
Description check ✅ Passed The description follows the template structure with all required sections completed: changes are clearly detailed, checklist items are marked, and release impact is properly indicated as docs-only.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/react-guides-replace-deprecated-is-server

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Jun 3, 2026

View your CI Pipeline Execution ↗ for commit 1fa5f29

Command Status Duration Result
nx run-many --target=build --exclude=examples/*... ✅ Succeeded <1s View ↗
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 24s View ↗

☁️ Nx Cloud last updated this comment at 2026-06-03 12:57:59 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@sukvvon sukvvon self-assigned this Jun 3, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 3, 2026

More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@10866

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@10866

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@10866

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@10866

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@10866

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@10866

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@10866

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@10866

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@10866

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@10866

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@10866

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@10866

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@10866

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@10866

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@10866

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@10866

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@10866

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@10866

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@10866

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@10866

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@10866

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@10866

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@10866

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@10866

commit: 1fa5f29

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

size-limit report 📦

Path Size
react full 12.11 KB (0%)
react minimal 9.08 KB (0%)

@sukvvon sukvvon merged commit dc0effd into main Jun 3, 2026
9 checks passed
@sukvvon sukvvon deleted the docs/react-guides-replace-deprecated-is-server branch June 3, 2026 13:23
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