Skip to content
Shubham JangleResources
React

Explore topics

Deployment

Watch the walkthrough
Open on Instagram

Quick revision

Deployment turns a verified production build into a hosted application. A development server's successful startup does not prove that a production build or deep link works.

Revision workflow

  1. Read the project's scripts and install with its lockfile and compatible Node version.
  2. Run the production build. The supplied React foundations examples use Create React App and output build/; a Vite application typically outputs dist/.
  3. Configure the host's framework, build command, output directory, and environment values for that project.
  4. For a client-side router, check the host's fallback routing so a direct request to a nested route can load the app.
  5. Verify assets, navigation, API calls, and refreshes on the deployed URL; inspect both browser console and host logs.

Environment and API details

Values embedded in a browser bundle are public. Keep API secrets on a server. Build-time variables require another build when changed. A local proxy is not automatically present in production; configure the real API origin and the server's CORS behavior where relevant.

There is no Day8 component folder in the supplied checkout. Review Day7's component code and package scripts as the deployable example.

Reference: Create React App deployment on Vercel.

Supporting material