This is an app bootstrapped with vite and it shows data fetching from an API, data caching, state persistence, data display and presentation. It is responsive and mobile-friendly.
Testing React App the easy way Testing React Applications the easy way with Testing Library, MSW, and Vitest — (Using a sample Vite app)
npm start
Start app like every react app, running the following command:
npm run dev
This runs the app in the development mode.
Open http://127.0.0.1:5173/ to view it in the browser.
npm test
Launches the test runner in the interactive watch mode.
npm test:ci
Launches the test coverage in an interactive mode.
The app on load shows a dashboard of game items. Each game on the dashboards can be added to a shop cart list and the number of items incremented or decremented, as well as being removed from the cart. Data are persisted across sessions and saved to local storage.
See Github.