How to create a live countdown clock?
Hi all,
We're creating an online auction which has a countdown clock on the show page of a listing.
The timer counts down every second, just like this example: https://countingdownto.com/
I've been looking at Stimulus Reflex, classic JS and action cable.
What's the best way to build this with rails?
Thanks for your feedback.
Hi Samuel,
I've ended up using vanilla JS. However, you could do the same with Stimulus, that's what I would do when rebuilding it.
Here's roughly the outline of the code that was used.
https://gist.github.com/thomasvanholder/1778df30141e4c47362102518930c043