Rx.js Fundamentals

Intervals & Timers Exercise

Steve Kinney

Steve Kinney

Rx.js Fundamentals

Check out a free preview of the full Rx.js Fundamentals course

The "Intervals & Timers Exercise" Lesson is part of the full, Rx.js Fundamentals course featured in this preview video. Here's what you'd learn in this lesson:

Students are instructed to create a simple counter using timer, counter, and unsubscribe based on the provided JavaScript.


Transcript from the "Intervals & Timers Exercise" Lesson

>> So we're going to play around with this with another quick exercise, which is we have a little counter that we're gonna build where we're gonna have a start button. And we're going to have a pause button or stop button. And ideally when they hit the start button, we should start counting.

And we hit the stop button, we should unsubscribe. Now this counter, I'm gonna warn you right now, it's not gonna be automatic just yet. We don't have all the tools that we need to build it the right way. Your job is to kinda figure out based on, other pieces of JavaScript how to get this to work, and then we will over a series of other exercises this morning, we'll add more and more functionality, and we'll get it to be idiomatic RxJS.

But it's not gonna be in the very beginning, so worry less about getting it right. Worry about using a timer interval, and getting it working at all. And then we'll kinda play around with that, and build on it as we go along.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now