docs: address RSC pitfalls review follow-ups (#3155)#3156
Conversation
WalkthroughDocumentation changes: add missing Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis is a documentation-only PR that applies five follow-up fixes from review issue #3155: adding a missing Confidence Score: 5/5Documentation-only PR with no code changes — safe to merge. All five changes are technically accurate corrections to existing documentation: the YAML snippet fix, inline comment correction, MessageChannel section reordering, expanded hooks checklist, and No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[MessageChannel Not Defined Error] --> B{Renderer config accessible?}
B -- Yes --> C["**Recommended**\nadditionalContext approach\nrequire('node:worker_threads').MessageChannel\ninjected into VM sandbox\n→ correct async scheduling"]
B -- No --> D["**Fallback**\nBannerPlugin polyfill\ninjected at bundle top\n→ synchronous delivery\nmay cause subtle bugs"]
C --> E[Error resolved]
D --> F{Unexpected rendering bugs?}
F -- Yes --> C
F -- No --> E
Reviews (1): Last reviewed commit: "docs: address RSC pitfalls review follow..." | Re-trigger Greptile |
|
Documentation-only review — accurate changes with a few minor suggestions (see inline comments and details below). No correctness or security concerns. |
| - **SSR entry-point files** using `StaticRouter`: these are SSR wrappers, not RSC server components — see the `.server.jsx` naming collision below | ||
| - **Event handlers**: `onClick`, `onChange`, `onSubmit`, etc. | ||
| - **Browser APIs**: `window`, `document`, `localStorage`, `fetch` in effects | ||
| - **Browser APIs**: `window`, `document`, `localStorage` (note: `fetch` is a Node.js global since v18 and works in Server Components — calling it directly in server context is an encouraged RSC pattern; only flag `fetch` if it is called inside a `useEffect`, which is already covered by the hooks list above) |
There was a problem hiding this comment.
The inline parenthetical here is ~220 characters — it wraps awkwardly in most renderers and buries the key point. Consider splitting it into a sub-bullet or a note block for scannability:
| - **Browser APIs**: `window`, `document`, `localStorage` (note: `fetch` is a Node.js global since v18 and works in Server Components — calling it directly in server context is an encouraged RSC pattern; only flag `fetch` if it is called inside a `useEffect`, which is already covered by the hooks list above) | |
| - **Browser APIs**: `window`, `document`, `localStorage` | |
| > **Note:** `fetch` is a Node.js global since v18 (experimental until v21) and works directly in Server Components — it is an encouraged RSC data-fetching pattern. Only flag `fetch` if it is called inside a `useEffect`, which is already covered by the hooks list above. |
There was a problem hiding this comment.
Thanks — I (Claude Code) am leaving the current inline parenthetical as-is. The substance about fetch being a Node.js global and the useEffect caveat is what users need; the surrounding bullets are similarly dense, and splitting just this one into a note block would make the list read inconsistently. Happy to revisit if rendering turns out to be a problem in a specific docs theme.
Review follow-up summaryI (Claude Code) triaged the latest review comments and applied fixes in commit 3e76c27. Addressed (1):
Declined (1):
Bot summaries (no action):
|
Code Review — Documentation only, low riskOverall: This is a solid set of documentation improvements addressing legitimate gaps and inaccuracies from PR #3087. All five targeted fixes are directionally correct. A few minor issues worth addressing: Issues1. Audit checklist omits The "What to look for" section lists Redux Suggested addition to the checklist search string: 2. The new comment says "no require() call emitted" — this is closer to correct than the old "provide empty modules" but is still slightly misleading. Webpack's // tells webpack: do not polyfill this module (import resolves to nothing)3. The code example shows: Nits (no action required)
Correct / approved changes
|
| Before proceeding to Step 1: | ||
|
|
||
| - [ ] Search your component source files for `useState`, `useEffect`, `useContext`, `useSelector`, `useDispatch`, `useTransition`, `useDeferredValue`, `useNavigate`, `useLocation`, `useParams`, `ReactOnRails.getStore` | ||
| - [ ] Search your component source files for `useState`, `useEffect`, `useLayoutEffect`, `useInsertionEffect`, `useContext`, `useRef`, `useImperativeHandle`, `useReducer`, `useCallback`, `useMemo`, `useTransition`, `useDeferredValue`, `useId`, `useSyncExternalStore`, `useOptimistic`, `useFormStatus`, `useSelector`, `useDispatch`, `useNavigate`, `useLocation`, `useParams`, `ReactOnRails.getStore`, `ReactOnRails.authenticityToken` |
There was a problem hiding this comment.
The "What to look for" section above flags Redux connect() as requiring 'use client', but connect( is missing from this search string. Developers following the checklist could miss connect() wrappings.
| - [ ] Search your component source files for `useState`, `useEffect`, `useLayoutEffect`, `useInsertionEffect`, `useContext`, `useRef`, `useImperativeHandle`, `useReducer`, `useCallback`, `useMemo`, `useTransition`, `useDeferredValue`, `useId`, `useSyncExternalStore`, `useOptimistic`, `useFormStatus`, `useSelector`, `useDispatch`, `useNavigate`, `useLocation`, `useParams`, `ReactOnRails.getStore`, `ReactOnRails.authenticityToken` | |
| - [ ] Search your component source files for `useState`, `useEffect`, `useLayoutEffect`, `useInsertionEffect`, `useContext`, `useRef`, `useImperativeHandle`, `useReducer`, `useCallback`, `useMemo`, `useTransition`, `useDeferredValue`, `useId`, `useSyncExternalStore`, `useOptimistic`, `useFormStatus`, `useSelector`, `useDispatch`, `connect(`, `useNavigate`, `useLocation`, `useParams`, `ReactOnRails.getStore`, `ReactOnRails.authenticityToken` |
Using connect( (with the opening paren) avoids false positives like connection or connected.
|
|
||
| ```js | ||
| // In serverWebpackConfig.js -- tells webpack to provide empty modules | ||
| // In serverWebpackConfig.js -- tells webpack to omit these modules (no require() call emitted) |
There was a problem hiding this comment.
resolve.fallback: false means webpack will not resolve the module to any polyfill — but the require call may still exist in the bundle output (it just resolves to an empty/unresolvable module rather than a shim). The phrase "no require() call emitted" overstates the effect.
| // In serverWebpackConfig.js -- tells webpack to omit these modules (no require() call emitted) | |
| // In serverWebpackConfig.js -- tells webpack to omit the polyfill (import resolves to nothing; no shim bundled) |
| // In your node-renderer.js config | ||
| const { MessageChannel } = require('node:worker_threads'); | ||
|
|
||
| const config = { |
There was a problem hiding this comment.
The snippet shows config being built but doesn't show how it's wired into the renderer. A reader unfamiliar with the node renderer API won't know what to do with this object. Consider adding a line like:
module.exports = config; // export from node-renderer.jsor a link to the node renderer configuration reference so the example is self-contained.
Applies the documentation review comments surfaced against PR #3087: - Add missing `runs-on: ubuntu-latest` to the CI workflow example in node-renderer/basics.md so the snippet is copy-paste valid. - Correct the `resolve.fallback: false` inline comment in rsc-troubleshooting.md to match the surrounding explanation ("omit the module" rather than "provide empty modules"). - Expand the upgrading-existing-pro-app audit checklist to include the React, React DOM, router, and ReactOnRails hook names that were listed in "What to look for" but missing from the checklist. - Reorder the MessageChannel troubleshooting section to lead with the recommended `additionalContext` fix and demote BannerPlugin to a fallback, so users encounter the preferred option first. - Clarify `fetch` under "Browser APIs": it is a Node.js global since v18 and works in Server Components; only flag it when called inside a `useEffect` (already covered by the hooks list). Fixes #3155 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add useLayoutEffect, useInsertionEffect, useImperativeHandle, and useSyncExternalStore to the React hooks list and the audit grep checklist. These hooks are client-only and would fail at runtime with "hook is not a function" in a mis-classified Server Component. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add `connect(` to the RSC audit grep checklist so it stays consistent with the "What to look for" section (which already lists Redux `connect()` as requiring `'use client'`). The `(` suffix avoids false positives like `connection`/`connected`. - Replace the misleading "no require() call emitted" phrasing for `resolve.fallback: false` with "imports resolve to nothing; no shim bundled" — webpack resolves the import to an empty module rather than suppressing the require() entirely. - Make the `additionalContext` MessageChannel example self-contained by showing `module.exports = config;` and linking to the node renderer JS configuration reference.
3e76c27 to
6ba6295
Compare
|
test |
|
NOTE: This is a placeholder - full review being posted in separate comment. Please ignore this comment. |
Change LogAll notable changes to this project's source code will be documented in this file. Items under
Migration instructions for the major updates can be found here. Some smaller migration information can be found here. Want to Save Time Updating?If you need help upgrading For an overview of working with us, see our Client Engagement Model article and how we bill for time. If you think ShakaCode can help your project, click here to book a call with Justin Gordon, the creator of React on Rails and Shakapacker. ContributorsPlease follow the recommendations outlined at keepachangelog.com. Please use the existing headings and styling as a guide. VersionsUnreleasedFixed
16.6.0 - 2026-04-09Removed
Added
Improved
Fixed
16.5.1 - 2026-03-27Fixed
16.5.0 - 2026-03-25Added
Changed
Improved
Fixed
Breaking Changes
16.4.0 - 2026-03-16Fixed
Improved
Changed
Added
16.3.0 - 2026-02-05Changed
Fixed
Added
16.2.1 - 2026-01-18Fixed
Developer (Contributors Only)
16.2.0 - 2026-01-14This release includes all features from the React on Rails Pro 4.0.0 release series (previously released as 4.0.0-rc.6 through 4.0.0-rc.15). Pro-specific entries are tagged with [Pro]. For pre-monorepo Pro history, see the archived Pro CHANGELOG. Breaking Changes
Migration Guide: To migrate to React on Rails Pro:
Note: If you're not using any of the Pro-only methods listed above, no changes are required.
Added
Changed
Improved
Fixed
Security
Deprecated
Documentation
Developer (Contributors Only)
16.1.1 - 2025-09-24Bug Fixes
16.1.0 - 2025-09-23New Features
Deprecations
API Improvements
Security Enhancements
Added
Generator Improvements
Bug Fixes
Code Improvements
16.0.0 - 2025-09-16React on Rails v16 is a major release that modernizes the library with ESM support, removes legacy Webpacker compatibility, and introduces significant performance improvements. This release builds on the foundation of v14 with enhanced RSC (React Server Components) support and streamlined configuration. See Release Notes for complete migration guide. Major Enhancements🚀 React Server Components (RSC) -- Requires React on Rails Pro
⚡ Performance & Loading Strategy
Developer Experience
Breaking Changes🔧 Webpacker Support Removed
📦 Package System Modernization
⚡ Configuration API Changes
🔄 Async API Changes
🏗️ Runtime Suggested Versions
🎯 Generator Improvements
[15.0.0] - 2025-08-28 - RETRACTEDThe 14.2.0 - 2025-03-03Added
Fixed
Changed
14.1.1 - 2025-01-15Fixed
14.1.0 - 2025-01-06Fixed
Added
Changed
14.0.5 - 2024-08-20Fixed
14.0.4 - 2024-07-02ImprovedChanged
14.0.3 - 2024-06-28Fixed
14.0.2 - 2024-06-11Fixed14.0.1 - 2024-05-16Fixed
14.0.0 - 2024-04-03Major bump because dropping support for Ruby 2.7 and deprecated Removed
Fixed
Added
13.4.0 - 2023-07-30Fixed
ImprovedAddedChanged
13.3.5 - 2023-05-31Fixed
13.3.4 - 2023-05-23Added
Removed13.3.3 - 2023-03-21Fixed13.3.2 - 2023-02-24Fixed
13.3.1 - 2023-01-30Added
Fixed13.3.0 - 2023-01-29Fixed
Added
13.2.0 - 2022-12-23Fixed
Added13.1.0 - 2022-08-20Improved
Fixed
13.0.2 - 2022-03-09Fixed
13.0.1 - 2022-02-09Improved13.0.0 - 2022-02-08Breaking
Fixed
12.6.0 - 2022-01-22Added
12.5.2 - 2021-12-29Fixed
12.5.1 - 2021-12-27Fixed
12.5.0 - 2021-12-26Added
Changed
12.4.0 - 2021-09-22Added
12.3.0 - 2021-07-26Added
12.2.0 - 2021-03-25Added
12.1.0 - 2021-03-23Added
Fixed
12.0.4 - 2020-11-14Fixed
12.0.3 - 2020-09-20Fixed
12.0.2 - 2020-07-09Fixed12.0.1 - 2020-07-09Fixed
12.0.0 - 2020-07-08For upgrade instructions, see the upgrading guide. Major Improvements
BREAKING CHANGEIn order to solve the issues regarding React Hooks compatibility, the number of parameters See docs/guides/upgrading-react-on-rails Other Updates
11.3.0 - 2019-05-24Added
11.2.2 - 2018-12-24Improved
11.2.1 - 2018-12-06MIGRATION for v11.2
Improved
Changed
11.2.0 - 2018-12-06Do not use. Unpublished. Caused by an issue with the release script. 11.1.8 - 2018-10-14Improved
11.1.7 - 2018-10-10Fixed
11.1.6 - 2018-10-05Fixed
11.1.5 - 2018-10-03Fixed
11.1.4 - 2018-09-12Fixed
11.1.3 - 2018-08-26Fixed
11.1.2 - 2018-08-18Fixed
11.1.1 - 2018-08-09Fixed
11.1.0 - 2018-08-07Added
Fixed
11.0.10 - 2018-07-22Fixed
11.0.9 - 2018-06-24
11.0.8 - 2018-06-15Fixed
Changed
11.0.7 - 2018-05-16Fixed11.0.6 - 2018-05-15Changed
11.0.5 - 2018-05-11Changed11.0.4 - 2018-05-3Changed
11.0.3 - 2018-04-24Fixed
11.0.2 - 2018-04-24Fixed11.0.1 - 2018-04-23AddedFixed11.0.0 - 2018-04-21MIGRATION for v11
Enhancements: Better Error Messages, Support for React on Rails Pro
Fixes
10.1.4 - 2018-04-11Fixed
10.1.3 - 2018-02-28Fixed
10.1.2 - 2018-02-27Fixed
10.1.1 - 2018-01-26Fixed10.1.0 - 2018-01-23Added
Fixed
10.0.2 - 2017-11-10Fixed
10.0.1 - 2017-10-28Fixed
10.0.0 - 2017-10-08Created
Deprecated
9.0.3 - 2017-09-20Improved9.0.2 - 2017-09-10Fixed9.0.1 - 2017-09-10Fixed9.0.0 - 2017-09-06Updated React on Rails to depend on rails/webpacker. PR 908 by justin808. 9.0 from 8.x. Upgrade InstructionsMoved to our documentation. 8.0.7 - 2017-08-16Fixed
8.0.6 - 2017-07-19Fixed
8.0.5 - 2017-07-04Fixed
Note: 8.0.4 skipped. 8.0.3 - 2017-06-19Fixed
8.0.2 - 2017-06-04Fixed
8.0.1 - 2017-05-30Fixed8.0.0 - 2017-05-29
8.0.0-beta.3 - 2017-05-27Changed
8.0.0-beta.2 - 2017-05-08ChangedRemoved unnecessary values in default paths.yml files for generators. #834 by justin808. 8.0.0-beta.1 - 2017-05-03AddedSupport for WebpackerLite in the generators. #822 by kaizencodes and justin808. ChangedBreaking change is that the default value of symlink_non_digested_assets_regex has changed from this symlink_non_digested_assets_regex: /\.(png|jpg|jpeg|gif|tiff|woff|ttf|eot|svg|map)/,7.0.4 - 2017-04-277.0.3 - 2017-04-27Same as 7.0.1. 7.0.2 - 2017-04-27Accidental release of beta gem here 7.0.1 - 2017-04-27Fixed7.0.0 - 2017-04-25ChangedFixed6.10.1 - 2017-04-23Fixed
6.10.0 - 2017-04-13Added
Fixed6.9.3 - 2017-04-03Fixed6.9.2 - 2017-04-02Changed
Fixed
6.9.1 - 2017-03-30Fixed6.9.0 - 2017-03-29FixedChanged
Added
6.8.2 - 2017-03-24Fixed
6.8.1 - 2017-03-21Fixed
6.8.0 - 2017-03-06Added6.7.2 - 2017-03-05Improved
6.7.1 - 2017-02-28No changes other than a test fix. 6.7.0 - 2017-02-28IMPORTANT
Commenting out this line addresses the issue: config.i18n_dir = Rails.root.join("client", "app", "libs", "i18n")Added
Fixed
6.6.0 - 2017-02-18Added6.5.1 - 2017-02-11Fixed
6.5.0 - 2017-01-31Added
Fixed
6.4.2 - 2017-01-17Fixed
6.4.1 - 2017-1-17No changes. 6.4.0 - 2017-1-12Possible Breaking Change
FixedAdded
6.3.5 - 2017-1-6Fixed
6.3.4 - 2016-12-25Fixed6.3.3 - 2016-12-25Fixed
6.3.2 - 2016-12-5Fixed
6.3.1 - 2016-11-30Changed6.3.0 - 2016-11-30Changed
6.2.1 - 2016-11-19
6.2.0 - 2016-11-19Changed
6.1.2 - 2016-10-24Fixed
6.1.1 - 2016-09-09Fixed
6.1.0 - 2016-08-21Added
Fixed
6.0.5 - 2016-07-11Added6.0.4 - 2016-06-13Fixed6.0.3 - 2016-06-07Fixed
6.0.2 - 2016-06-06Fixed
6.0.1 - 2016-05-27Fixed
6.0.0 - 2016-05-25Breaking Changes
Here is the addition to the generated config file: # This configures the script to run to build the production assets by webpack. Set this to nil
# if you don't want react_on_rails building this file for you.
config.build_production_command = "npm run build:production"
# If you are using the ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
# with rspec then this controls what npm command is run
# to automatically refresh your webpack assets on every test run.
config.npm_build_test_command = "npm run build:test"Fixed
Added
Changed
Removed
5.2.0 - 2016-04-08Added
Removed
5.1.1 - 2016-04-04Fixed
Added
5.1.0 - 2016-04-03AddedAll 5.1.0 changes can be found in #362 by justin808.
5.0.0 - 2016-04-01Added
Changed
Breaking Changes
4.0.3 - 2016-03-17Fixed
4.0.2 - 2016-03-17Fixed
4.0.1 - 2016-03-16Fixed
4.0.0 - 2016-03-14Added
Changed
Fixed
Breaking Changes
3.0.6 - 2016-03-01Fixed3.0.5 - 2016-02-26Fixed3.0.4 - 2016-02-25Fixed
3.0.3 - 2016-02-21Fixed
3.0.2 - 2016-02-15Fixed
3.0.1 - 2016-02-15Fixed
3.0.0 - 2016-02-15Fixed
Added
Breaking Change
Migration Steps v2 to v3
RSpec.configure do |config|
# Ensure that if we are running js tests, we are using latest webpack assets
ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
2.3.0 - 2016-02-01Added
2.2.0 - 2016-01-29Added
2.1.1 - 2016-01-28Fixed
Added
2.1.0 - 2016-01-26Added
Changed
Fixed
2.0.2
2.0.1
2.0.0
import ReactOnRails from 'react-on-rails';
ReactOnRails.register({name: component});Best done with Object destructing: import ReactOnRails from 'react-on-rails';
ReactOnRails.register(
{
Component1,
Component2
}
);Previously, you used window.Component1 = Component1;
window.Component2 = Component2;This would pollute the global namespace. See details in the README.md for more information.
ReactOnRails.render(componentName, props, domNodeId);such as: ReactOnRails.render("HelloWorldApp", {name: "Stranger"}, 'app');
Migration Steps v1 to v2
1.2.2Fixed
1.2.0Added
Fixed
Removed
1.1.1 - 2015-11-28Added
Fixed
|
|
Line1 |
Code ReviewOverall: Documentation-only PR that is well-scoped and tackles five concrete review follow-ups. The MessageChannel reordering is the most impactful change — leading with the Correctness concerns
The inline comment now says "imports resolve to nothing" while the paragraph says "the import resolves to an empty module." These are technically different:
"Resolves to nothing" implies the import is dropped or throws, which is not accurate. The paragraph wording ("empty module") is correct — the inline comment should be updated to match. Missing client-only React hooks The expanded hook list is a big improvement, but two client-only hooks are still absent:
Given the PR targets React 19.0.4+, Readability / usabilitySingle-line checklist item with 20+ terms The audit checklist now collapses all hook names into one enormous search line. This is hard to scan and hard to use practically. Consider replacing it with a ready-to-copy grep -rE "useState|useEffect|useLayoutEffect|useInsertionEffect|useContext|useRef|useImperativeHandle|useReducer|useCallback|useMemo|useTransition|useDeferredValue|useId|useSyncExternalStore|useOptimistic|useActionState|useFormStatus|useSelector|useDispatch|connect\(|useNavigate|useLocation|useParams|ReactOnRails\.getStore|ReactOnRails\.authenticityToken" app/javascript/A single grep invocation is more actionable for larger codebases, and it stays correct even as the list grows.
The parenthetical explaining Minor nitThe Verdict: Approve after addressing the |
…ons-docs * origin/main: chore: remove redundant --rsc-pro install generator flag (#3105) ci: warn (don't fail) on Bencher main regression (#3168) test: enable RSpec --profile to surface slowest package tests (#3176) fix(node-renderer): expose performance in VM context when supportModules (#3158) docs: remove stale immediate_hydration references (#3139) (#3159) docs: restore absolute URL for node-renderer testing example (#3179) Bump Rspack dependencies to v2 (^2.0.0-0) (#3084) chore: remove obsolete webpack <5.106.0 pin (#3175) Move Node Renderer entry point to renderer/ directory (#3165) docs: address RSC pitfalls review follow-ups (#3155) (#3156) docs: remove fabricated DevConsole reference, link verified RSC tools (#2527) (#3163) # Conflicts: # docs/oss/building-features/node-renderer/js-configuration.md
…ging' into jg/3122-rolling-deploy-adapter * origin/jg/3122-unify-renderer-cache-staging: (39 commits) fix(specs): boot dummy specs without readline and drop redundant pnpm workspace (#3190) docs: add RSC migration success stories page (#1985) (#3162) Fix Bencher reporting permanently broken on pushes to main (#3148) docs: add example migrations guide (#3126) docs: remove defunct guavapass.com reference (#3199) chore: remove redundant --rsc-pro install generator flag (#3105) ci: warn (don't fail) on Bencher main regression (#3168) test: enable RSpec --profile to surface slowest package tests (#3176) fix(node-renderer): expose performance in VM context when supportModules (#3158) docs: remove stale immediate_hydration references (#3139) (#3159) docs: restore absolute URL for node-renderer testing example (#3179) Bump Rspack dependencies to v2 (^2.0.0-0) (#3084) chore: remove obsolete webpack <5.106.0 pin (#3175) Move Node Renderer entry point to renderer/ directory (#3165) docs: address RSC pitfalls review follow-ups (#3155) (#3156) docs: remove fabricated DevConsole reference, link verified RSC tools (#2527) (#3163) Scaffold CI workflow and build scripts for first-run consistency (#3097) Add OPTIONAL triage tier and fix recommendations to /address-review (#3161) chore: sync Gemfile.lock with term-ansicolor 1.11.3 (#3164) Simplify the docs sidebar and Pro landing pages (#3119) ...
* origin/main: fix(specs): boot dummy specs without readline and drop redundant pnpm workspace (#3190) docs: add RSC migration success stories page (#1985) (#3162) Fix Bencher reporting permanently broken on pushes to main (#3148) docs: add example migrations guide (#3126) docs: remove defunct guavapass.com reference (#3199) chore: remove redundant --rsc-pro install generator flag (#3105) ci: warn (don't fail) on Bencher main regression (#3168) test: enable RSpec --profile to surface slowest package tests (#3176) fix(node-renderer): expose performance in VM context when supportModules (#3158) docs: remove stale immediate_hydration references (#3139) (#3159) docs: restore absolute URL for node-renderer testing example (#3179) Bump Rspack dependencies to v2 (^2.0.0-0) (#3084) chore: remove obsolete webpack <5.106.0 pin (#3175) Move Node Renderer entry point to renderer/ directory (#3165) docs: address RSC pitfalls review follow-ups (#3155) (#3156) # Conflicts: # CHANGELOG.md
Summary
Applies the five documentation review comments from PR #3087 that were triaged to issue #3155:
docs/oss/building-features/node-renderer/basics.md— Add missingruns-on: ubuntu-latestto the GitHub Actions workflow example so the snippet is copy-paste valid.docs/oss/migrating/rsc-troubleshooting.md— Correct theresolve.fallback: falseinline comment to say "omit these modules (no require() call emitted)", matching the paragraph below it (no empty-module shim is generated).docs/pro/react-server-components/upgrading-existing-pro-app.md— Expand the audit checklist to include the React hooks (useRef,useReducer,useCallback,useMemo,useId,useOptimistic), React DOM hooks (useFormStatus), andReactOnRails.authenticityTokenthat were listed under "What to look for" but missing from the checklist.docs/oss/migrating/rsc-troubleshooting.md— Reorder the MessageChannel Not Defined section to lead with the recommendedadditionalContextfix (injecting Node's nativeMessageChannelfromnode:worker_threads) and demote BannerPlugin to a labeled fallback, so readers encounter the preferred approach first.docs/pro/react-server-components/upgrading-existing-pro-app.md— Clarifyfetchunder "Browser APIs": it's a Node.js global since v18 and works in Server Components. The list now only flagsfetchcalls insideuseEffect, which are already captured by the hooks list above.Fixes #3155
Test plan
npx prettier --check) passes on all three modified docs🤖 Generated with Claude Code
Note
Low Risk
Documentation-only updates that adjust examples and recommended fixes; no runtime behavior changes, so risk is low aside from potential reader confusion if guidance is misapplied.
Overview
Updates RSC/Node Renderer docs to make setup and troubleshooting guidance more accurate and copy/paste-ready.
The CI workflow snippet now includes
runs-on: ubuntu-latest, the webpackresolve.fallback: falseexplanation is clarified, and theMessageChannel is not definedsection is reordered to recommend injecting Node’s nativeMessageChannelviaadditionalContext(withBannerPluginpolyfill as an explicit fallback). The Pro RSC upgrade guide expands the client-API audit checklist to cover additional hooks/APIs and clarifies thatfetchis usable in Server Components (flag it only when used inuseEffect).Reviewed by Cursor Bugbot for commit 6ba6295. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit