REACT SLIP 13 - Redux Counter and Console
Marks: 12 | Source: original question PDF page 13
Concepts: configureStore, createSlice, Provider, useSelector, useDispatch

A. RUN THE READY PROJECT (recommended)
1. Install Node.js 22 LTS (22.12+), and VS Code. Check in terminal:
   node -v
   npm -v
2. Open the slip13 folder in VS Code (File > Open Folder).
3. Terminal > New Terminal. Make sure the terminal is inside slip13, where package.json exists.
4. Run:
   npm install
5. Run:
   npm run dev
6. Open the Local URL shown in terminal (usually http://localhost:5173/).
7. For console output, press F12 > Console in Chrome. Keep the browser and terminal open.
8. To stop the server, press Ctrl+C in the terminal.
9. Optional production compilation: npm run build
   Optional preview after build: npm run preview

B. CREATE FROM SCRATCH (exam revision)
1. Open CMD / VS Code terminal in an EMPTY parent folder, outside the ready project.
2. Create a fresh React app named react-slip-13:
   npm create vite@6 react-slip-13 -- --template react
   cd react-slip-13
   If asked to install create-vite, answer y.
3. Replace the scaffold package.json with this slip's supplied package.json (keeps the same dependencies).
   Copy the supplied index.html and entire src folder into the new project, replacing matching files.
   Copy public/ if supplied. Delete any unused scaffold files only if desired.
   This project uses Vite's built-in JSX transform with explicit React imports;
   remove the scaffold vite.config.js/ts if present (the extra plugin is not required).
4. Install dependencies:
   npm install
   Additional library commands if installing individually:
   npm install @reduxjs/toolkit@^2.8.2 react-redux@^9.2.0
5. Start: npm run dev
6. Open the Local URL in browser. F12 > Console if needed.

C. FILES TO STUDY
index.html, package.json, src/main.jsx, src/App.jsx, src/index.css, src/store.js
Read QUESTION.txt for the original task. The primary answer code is src/App.jsx.

D. EXPECTED OUTPUT AND MANUAL CHECK
Initial count 0; Increment -> 1; Decrement -> 0. Console logs 0, 1, 0 as state changes.

E. COMMON PROBLEMS
- npm not recognized: install Node.js, then reopen VS Code.
- npm.ps1 blocked: select Command Prompt terminal or run npm.cmd install and npm.cmd run dev.
- Missing package.json: cd into the correct slip13 folder.
- Cannot find module: npm install in this project's folder.
- Port 5173 busy: use the actual Local URL printed by Vite, or stop the other server.
- No console output: open Chrome DevTools Console and clear filters.
- Do not double-click index.html; Vite serves the JSX modules.
