This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Repository: https://github.com/Sanmalapavan/react-app
Open a PowerShell terminal and run:
# go to project folder
Set-Location 'C:\Users\S.PAWAN\Downloads\OneDrive\Desktop\Demo'
# install dependencies
npm install
# run dev server with HMR
npm run dev
# build for production
npm run build
# preview production build
npm run preview
# lint the project
npm run lint- React 19 + Vite starter (entry:
src/main.jsx, main component:src/App.jsx) - Pages:
src/Pages/Home.jsx,src/Pages/Login.jsx,src/Pages/Registrations.jsx - Components:
src/Components/Navbar.jsx,src/Components/RecipeCard.jsx - Uses Material UI (MUI) + Emotion for UI and styling.
package.jsonpins Vite viaoverridestonpm:rolldown-vite@7.1.12— be cautious when upgrading Vite/plugins.- Data fetch:
Home.jsxfetches recipes fromhttps://dummyjson.com/recipes. - The app currently has no client-side routing (App renders
Homedirectly).
- Added loading/error handling and safe mapping keys in
src/Pages/Home.jsx. - Fixed
TextFieldprop typovarient→variantinLogin.jsxandRegistrations.jsx. - Renamed confusing state setters (e.g.,
isLoading→setLoading). - Guarded
post.instructionsand added keys insidesrc/Components/RecipeCard.jsx. - Added
.gitignoreto prevent committing node_modules and editor files.
- Fork & clone the repo
- Create a branch:
git checkout -b feature/your-feature - Make changes, then:
git add .
git commit -m "Short message"
git push -u origin feature/your-feature- Open a Pull Request on GitHub.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
The React Compiler is not enabled on this template. To add it, see this documentation.
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.