Rx.js Fundamentals

switchMap Exercise

Steve Kinney

Steve Kinney

Temporal
Rx.js Fundamentals

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

The "switchMap 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 use switchMap to switch between an interval timer and NEVER based on the "Start" and "Stop" buttons.

Preview
Close

Transcript from the "switchMap Exercise" Lesson

[00:00:00]
>> So with that, what we kind of wanna do is see if we can get that working with our counter. Because we have a lot of the infrastructure in here. We had a play in a pause button, we had an observable that we care about. What we wanna do is now take, we wanna merge together those two buttons in our basic counter, right?

[00:00:19]
And then we wanna switch between that interval observable and never based on the given state that we're in at a given point

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