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
devfor local iteration with fast feedback.buildfor production artifact validation.previewfor 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
- Pin Node.js version in team docs and CI images.
- Keep lockfiles committed for deterministic installs.
- 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.