Skip to content

citruscode-tech/switch-2-timer-react

 
 

Repository files navigation

🚀 Switch 2 Countdown — React Edition

Convert the vanilla‑JS timer from
https://github.com/TTPR-LaGuardia-Community-College/js-lab-switch2-countdown-ttpr
into a state‑driven React app that shows off the component life‑cycle.


🎯 Objectives

Goal You will …
State Store changing data with useState and trigger re‑renders.
Lifecycle Start a “tick” when the component mounts, and stop it when it unmounts (useEffect).
Props Feed the launch date as a prop instead of hard‑coding.
Declarative UI Swap to “Switch 2 is out! 🎉” by changing state, not the DOM.
Stretch Play a sound and/or run multiple timers without copy‑pasting logic.

🛠 Getting Started

  1. Clone the original repo (for reference only).

  2. Scaffold a fresh React project:

    // Inside Repo
    npm create vite@latest switch2-react -- --template react
    cd switch2-react
    npm install

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 57.4%
  • JavaScript 34.0%
  • HTML 8.6%