Skip to content

[v2] chore(examples): render every React example in StrictMode - #2409

Closed
dasjideepak wants to merge 1 commit into
TanStack:alphafrom
dasjideepak:examples/strict-mode-everywhere
Closed

dasjideepak wants to merge 1 commit into
TanStack:alphafrom
dasjideepak:examples/strict-mode-everywhere

Conversation

@dasjideepak

@dasjideepak dasjideepak commented Sep 26, 2026 •

Copy link
Copy Markdown

🎯 Changes

Part of #2305. Per the discussion there, every example should run in StrictMode (ports stay as they are).

  • Wrapped <App /> in React.StrictMode in the 6 Vite examples that rendered without it: array, basic, basic-splitting-form, field-groups, ui-integration-dnd-kit and ui-integration-shadcn. Same pattern as simple, large-form and the others that already had it.
  • react/nextjs: set reactStrictMode: true in next.config.ts, matching next-server-actions and next-server-actions-zod.
  • react/expo: index.ts now registers a small Root component that renders App inside StrictMode. It uses createElement because the entry file is .ts (it's the package's main).

Already in StrictMode, so unchanged: compiler, large-form, multi-step-wizard, query-integration, simple, standard-schema, and tanstack-start (Start's default client entry hydrates inside <StrictMode>).

The other frameworks don't have a StrictMode equivalent, so they're untouched.

I ran tsc and vite build for each changed Vite example, tsc for nextjs and expo, and prettier on the changed files.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm test:pr, or these tests do not apply to this pull request. (Examples only; I type-checked and built each changed example.)
  • I fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

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

@coderabbitai

coderabbitai Bot commented Sep 26, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: TanStack/form/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 399634f7-cf33-4178-96c4-a6f064427e18

📥 Commits

Reviewing files that changed from the base of the PR and between 541abc8 and 13215d7.

📒 Files selected for processing (8)
  • examples/react/array/src/index.tsx
  • examples/react/basic-splitting-form/src/index.tsx
  • examples/react/basic/src/index.tsx
  • examples/react/expo/index.ts
  • examples/react/field-groups/src/index.tsx
  • examples/react/nextjs/next.config.ts
  • examples/react/ui-integration-dnd-kit/src/index.tsx
  • examples/react/ui-integration-shadcn/src/index.tsx
 ________________________________________
< Even Chuck Norris needs a code review. >
 ----------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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.

@dasjideepak

Copy link
Copy Markdown
Author

Moved into #2406 to keep the series smaller.

@dasjideepak
dasjideepak deleted the examples/strict-mode-everywhere branch September 26, 2026 07:25
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