Created
August 16, 2021 15:19
-
-
Save knirb/028e910c5b61718a4f0fbcfe5161c79d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const length = 10 * 1000 * 60; | |
const App: React.FC = () => { | |
const timer = useTimer({ length }); | |
return ( | |
<div className="App"> | |
<h2>{timer.value}</h2> | |
<div> | |
<Button onClick={timer.start}>Start</Button> | |
<Button onClick={timer.stop}>Stop</Button> | |
<Button onClick={timer.skip}>Skip</Button> | |
<Button onClick={timer.reset}>Reset</Button> | |
</div> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment