Skip to main content
Fully automated. Both Vite and CRA are wired up completely by the CLI.

Install with the CLI

Pick React when prompted, then choose your build tool.

Vite

1

Environment variable

.env:
2

Provider component

src/providers.tsx:
3

Wrap the render call

src/main.tsx:

Create React App

1

Environment variable

.env:
2

Provider component

src/providers.tsx:
3

Wrap the render call

src/index.tsx:

Notes

  • Env var prefixes differ: Vite uses VITE_, CRA uses REACT_APP_. The CLI picks the right one for you.
  • The provider wraps the render call in the entrypoint, not inside App.tsx. This keeps it outside of React.StrictMode’s double‑mount behavior so the session isn’t reset on the development reload.