Real World Example

Real World: Starting an e-commerce frontend

A typical company project is created with Vite, then the usual libraries are added: routing, API calls, global state, and an environment variable for the backend URL.

npm create vite@latest shop-frontend -- --template react
cd shop-frontend
npm install react-router-dom axios @reduxjs/toolkit react-redux
echo VITE_API_URL=https://api.myshop.com > .env
npm run dev