🚀 A fast-paced timer app built with React that challenges you to stop the clock at precise target times. (Udemy React Exercise)
Multiple Difficulty Levels: Choose from easy, medium, or hard challenges Precision Timing: Test your reflexes by stopping the timer at exact target times
- React
- React Hooks (useState, useRef, useImperativeHandle, forwardRef)
- React Dom (createPortal)
- CSS Modules for styling
- Clone the repository:
git clone https://github.com/Markus-cod/time-race-react-exercise.git- Navigate to the project directory:
cd time-race-react-exercise- Install dependencies:
npm install- Start the development server:
npm run dev- Open your browser to:
http://localhost:5173
- Select your difficulty level:
- Easy: 1.000s target (±0.100s tolerance)
- Medium: 2.000s target (±0.075s tolerance)
- Hard: 5.000s target (±0.050s tolerance)
- Click "Start" to begin the timer
- Click "Stop" when you believe the timer matches the target time
- See your results:
- Perfect stop! (within 10ms)
- Good stop (within tolerance)
- Missed the target
- Try to improve your best time and accuracy!
/src
/components
Player.jsx
ResultModal.jsx
TimerChallenge.jsx
App.js
index.css
npm run dev: Runs the app in development modenpm run build: Builds the app for production
- Add leaderboard functionality
- Implement vibration feedback on mobile
- Add more challenge modes (random targets, sequence challenges)
- Save best scores to localStorage
Pull requests are welcome! For major changes, please open an issue first to discuss what you'd like to change.
MIT
Test your timing skills and see how precise you can be! ⏱️🎯