165 views
Countdown component with restore button
Task condition
Create a React component called Countdown that: – receives a prop startTime (in milliseconds), – automatically starts decreasing the value to zero, – does not allow the value to become negative, – displays the remaining time on the screen, – has a Reset button that returns the counter to its initial value.
import "./styles.css";
import Countdown from "./Countdown";
export default function App() {
return (
<div className="App">
<Countdown startTime={5000} />
</div>
);
}