A fast, responsive mini-game built with React to explore component state, interactivity, and accessibility best practices. Roll until all dice match β click dice to hold their value between rolls and keep going until every die shows the same number.
Core
- React (Vite)
- JavaScript (ES6+)
- CSS3 (Grid & Flexbox)
Tooling & Libraries
- ESLint
- nanoid
- react-confetti
- react-use
src/
βββ components/
β βββ Die.jsx
βββ assets/
β βββ docs/
β β βββ future-todos.md
β β βββ pseudocode.md
β βββ shots/
β βββ scsh-01.png
β βββ scsh-02.png
β βββ scsh-03.png
βββ App.jsx
βββ main.jsx
βββ index.css
| Game Start | Selected Dice | Game Won |
|---|---|---|
![]() |
![]() |
![]() |
Through this project I practiced:
- Managing component state and derived logic in React
- Handling accessibility with
aria-pressed,aria-live, and keyboard focus - Lazy state initialization and conditional rendering
- Responsive layouts with CSS Grid and Flexbox
- Integrating third-party React libraries for UX polish
Detailed refactor ideas, accessibility updates, and planned features are documented here:
β‘οΈ future-todos.md
These include:
- Extracting game logic into a custom hook
- Adding roll animations and dark mode
- Persisting scores and game state
-
Clone the repository
git clone https://github.com/yourusername/react-tenzies.git cd react-tenzies -
Install dependencies
npm install
-
Run the app locally
npm run dev
Note: Keep all dice state in the parent (
App) to maintain a single source of truth. Avoid derived or duplicated state in child components. Use refs for DOM focus management without triggering re-renders. See future-todos.md for more technical notes.
- Scrimba Course β Learn React
- YouTube Tutorial β Tenzies Game Walkthrough
- Dependencies β nanoid, react-confetti, react-use
Completed: October 2025
Status: Functional and stable β future improvements planned
This project demonstrates React fundamentals, accessibility awareness, and thoughtful UI design β packaged into a clean, self-contained mini-game. Itβs designed as both a learning project and a showcase of professional development practices.


