Skip to content
Source
Sign inSign up
TanStack/form

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

Closeddasjideepak(GitHub profile, opens in a new tab)wants to merge 1 commit intoalpha fromrefs/pull/2409/headopened

🎯 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).
    1. 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 541abc8a1fca69cc2bb682da4f59bf9fc6defaf6 and 13215d790aa5e92d97c750658ba5cf4af12a5c25.

      📒 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.
    2. Moved into #2406 to keep the series smaller.

Sign in to join this conversation.