- Attaching JS Events in React
- What is a Hook?
- Declaring State
- Altering State with an Event
- Array States
Begin by running:
npm install
followed by
npm start
-
When someone clicks on the
DaysCounter
button, the number of days decreases. It will not decrease below 0. -
When someone clicks the
buy
button in theSupplyCard
, it toggles a state that either applies or removes thestrikethrough
class to the span inside the card. Additionally, the button changes text between 'Buy' and 'Complete'.