DEV Community

Discussion on: Build a Countdown Timer for Writing

Collapse
 
cyrilcabo profile image
Cyril Cabo • Edited

I think setTimeout is a better way of implementing the countdown. Such is the reason that you don't need to have a clean-up function, and a much simpler code (see example in the photo).

Example code

But it's a good read, great work!

Collapse
 
kahawaiikailana profile image
Kailana Kahawaii

Hi Cyril! Hooks would be cleaner. Thanks for the suggestion.