With the power of subscriptions, we now have a running clock!
More importantly, we understand how to issue commands to the outside world (like “tell me what time it is”). Other commands include sending an HTTP request, navigating to a URL, and even scrolling the document.
We also undersand how to subscribe to things happening outside our program (such as time passing). Other subscriptions include mouse gestures, the progress of an HTTP request, and even the browser’s readiness to render a new animation frame.
With these new tools in hand, you have everything you need to turn this boring clock into a super cool stopwatch! That’s why you won’t find the code for the finished stopwatch here. It’s up to you to write it.
Here’s a recommended roadmap to follow:
Time
values.)Bool
value in your model might be useful.)