Skip to content

Instantly share code, notes, and snippets.

View t-c-k's full-sized avatar

Tom t-c-k

  • Salon App
  • Brighton
View GitHub Profile
const Timer = () => {
const [start, setStart] = useState(new Date());
const [now, setNow] = useState(new Date());
useEffect(() => {
const interval = setInterval(() => {
setNow(new Date());
}, 1000);
return () => {