A simple React project that simulates a Ludo board score tracker. Each player has a separate counter, and clicking the corresponding button increases that player's move count.
This project is built to practice React fundamentals such as state management, event handling, and updating objects in state.
- Four players (Blue, Red, Yellow, Green)
- Independent move counters
- State management using
useState - Updating object state immutably
- Responsive button interactions
- Clean and beginner-friendly code
- React
- JavaScript (ES6+)
- Vite
- CSS
src/
│── App.jsx
│── LudoBoard.jsx
│── main.jsx
│── index.css
- React Functional Components
- JSX
- useState Hook
- Object State
- Previous State Callback
- Spread Operator (
...) - Event Handling
- Component Rendering
This project helped me understand:
- Why React state should never be mutated directly.
- How to update object state using the spread operator.
- Why the callback version of
setStateis useful. - How React re-renders components after state updates.
Clone the repository
git clone https://github.com/your-username/react-ludo-board.gitNavigate to the project
cd ludo-score-tracker-reactInstall dependencies
npm installStart the development server
npm run dev- Reset button
- Dice roll simulation
- Winning condition
- Player turn indicator
- Responsive UI
- Better styling using CSS modules or Tailwind CSS
Dilpreet Kaur
B.Tech CSE Student
Learning React one project at a time 🚀