Skip to content

docs: add directDomUpdates and directDomUpdatesMode options#1185

Merged
piecyk merged 2 commits into
TanStack:mainfrom
piecyk:damian/docs/react-direct-dom-updates
Jun 2, 2026
Merged

docs: add directDomUpdates and directDomUpdatesMode options#1185
piecyk merged 2 commits into
TanStack:mainfrom
piecyk:damian/docs/react-direct-dom-updates

Conversation

@piecyk
Copy link
Copy Markdown
Collaborator

@piecyk piecyk commented Jun 2, 2026

🎯 Changes

Add missing documentation for the directDomUpdates and directDomUpdatesMode React-specific options to the React Virtual docs page.

✅ 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
    • Added user-facing documentation for two React Virtualizer options—directDomUpdates and directDomUpdatesMode—including how to enable them, required layout/positioning constraints, guidance on choosing between positioning modes, example usage, and a caution about toggling these options at runtime to avoid stale inline styles.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 2, 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: 10c870b7-9a8b-4c14-a557-dea9a35c4154

📥 Commits

Reviewing files that changed from the base of the PR and between 3f827b5 and d09292e.

📒 Files selected for processing (2)
  • docs/framework/react/react-virtual.md
  • packages/react-virtual/src/index.tsx
✅ Files skipped from review due to trivial changes (1)
  • packages/react-virtual/src/index.tsx

📝 Walkthrough

Walkthrough

Documentation for two new React Virtualizer options is added: directDomUpdates (bypasses React re-renders for scroll-only DOM updates) and directDomUpdatesMode (selects 'transform' or 'position' positioning). Includes constraints, warnings, and usage examples; plus minor JSDoc wording tweaks in the package.

Changes

Direct DOM Updates Documentation

Layer / File(s) Summary
directDomUpdates and directDomUpdatesMode options documentation
docs/framework/react/react-virtual.md
Adds sections documenting directDomUpdates defaults, behavioral effects, mount-time requirements (absolute positioning, container constraints), runtime toggle warnings, and configuration examples; documents directDomUpdatesMode type, default, and distinction between 'transform' and 'position' modes with examples.
inline JSDoc wording updates
packages/react-virtual/src/index.tsx
Small wording adjustments in ReactVirtualizer and ReactVirtualizerOptions JSDoc to clarify “inner size” phrasing and align the containerRef/directDomUpdates requirement text.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • TanStack/virtual#1180: Implements the directDomUpdates feature and DOM update logic that this PR documents.

Poem

🐰 I hopped through docs to plant a clue,
Two flags to skip a render or two,
Transform or position, choose your tune,
I’ll nibble notes beneath the moon,
Hooray—fast scrolls, and happy view!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding documentation for two React Virtualizer options (directDomUpdates and directDomUpdatesMode).
Description check ✅ Passed The description follows the template structure with all required sections completed: Changes section explains what was added, both checklist items are marked as completed, and Release Impact correctly identifies this as docs-only with no changeset needed.
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

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.

❤️ Share

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

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Jun 2, 2026

View your CI Pipeline Execution ↗ for commit d09292e

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

☁️ Nx Cloud last updated this comment at 2026-06-02 06:57:54 UTC

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 2, 2026

More templates

@tanstack/angular-virtual

npm i https://pkg.pr.new/@tanstack/angular-virtual@1185

@tanstack/lit-virtual

npm i https://pkg.pr.new/@tanstack/lit-virtual@1185

@tanstack/react-virtual

npm i https://pkg.pr.new/@tanstack/react-virtual@1185

@tanstack/solid-virtual

npm i https://pkg.pr.new/@tanstack/solid-virtual@1185

@tanstack/svelte-virtual

npm i https://pkg.pr.new/@tanstack/svelte-virtual@1185

@tanstack/virtual-core

npm i https://pkg.pr.new/@tanstack/virtual-core@1185

@tanstack/vue-virtual

npm i https://pkg.pr.new/@tanstack/vue-virtual@1185

commit: d09292e

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/framework/react/react-virtual.md`:
- Line 87: Replace the phrase "inner sized container" with the hyphenated form
"inner-sized container" in the sentence that mentions virtualizer.containerRef
(the line that reads the inner sized container must receive
`virtualizer.containerRef` and must **not** set `height` / `width` in its style)
so the documentation reads "inner-sized container" for correct
compound-adjective hyphenation and improved readability.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 85cbd494-c324-48a5-bd8b-407b3e7302fb

📥 Commits

Reviewing files that changed from the base of the PR and between c0b84c8 and 3f827b5.

📒 Files selected for processing (1)
  • docs/framework/react/react-virtual.md

Comment thread docs/framework/react/react-virtual.md Outdated
@piecyk piecyk merged commit 13dec39 into TanStack:main Jun 2, 2026
10 checks passed
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