A React-based countdown application designed to practice Refs and Portals. The app allows users to enter their name and participate in four different challenges, where they can start and stop timers to earn scores.
✅ User Input – Enter your name before starting the challenges.
🎯 Four Challenges – Users can start and stop any of the available challenges.
🏆 Scoring System:
🔹 Stop the timer before it expires to earn points.
🔹 Lose if the timer reaches zero.
🔹 Maximize your score by stopping the timer as close as possible to the initial start time.
🔌 React Portals & Refs:
📌 Portals – Render UI elements outside the main DOM hierarchy.
📌 Refs – Efficiently handle timer functionality.
🔹 React (Functional components, Hooks, Refs, Portals)
🔹 JavaScript
🔹 CSS (for styling)
Ensure you have Node.js installed on your system.
- Clone the repository:
git clone https://github.com/AqibNiazi/countdown.git
- Navigate to the project directory:
cd countdown
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Enter your name in the input field.
- Start any of the four available challenges.
- Stop the timer manually before it expires to earn points.
- If the timer reaches zero, you lose.
- Maximize your score by stopping the timer as close as possible to the initial time.
✨ Add difficulty levels.
🏆 Implement a leaderboard.
🎨 Enhance UI/UX.