Environment and Tooling

Professional React work depends on stable tooling, repeatable scripts, and reliable local-to-CI parity.

Project bootstrap

npm create vite@latest my-react-app -- --template react
cd my-react-app
npm install
npm run dev

Scripts and pipeline

  • dev for local iteration with fast feedback.
  • build for production artifact validation.
  • preview for testing built output before deployment.

Linting and formatting

Use linting and formatter rules to minimize style drift and code review noise in team workflows.

Environment variables

Configure runtime values through environment files and deployment settings. Never commit secrets in source code.

Professional tips

  1. Pin Node.js version in team docs and CI images.
  2. Keep lockfiles committed for deterministic installs.
  3. Run lint and build in pull requests before merge.

Practice

Initialize a React app, add lint and build scripts, and create a CI pipeline that fails on lint or build errors.