I built a tabata timer as a web app — and wrote about the process.

What started as a small tool for my workouts turned into a deep dive into useReducer as a state machine, Screen Wake Lock API, and haptic feedback on the web.

A few things I found interesting along the way:

→ useReducer is a perfect fit when your component has phases and transitions. The entire timer runs on just 3 dispatched actions.

→ Screen Wake Lock API is how apps like Netflix keep your screen awake — and it's surprisingly simple to use.

→ The Vibration API lets you add physical feedback with one line of code. Small touch, big difference in feel.

The app is live if you want to try it: https://chornonoh-vova.github.io/tabata-timer/

Full write-up with code and diagrams on my blog: https://www.chornonoh-vova.com/blog/tabata-timer-app

Keep Reading