I have an observable that must complete an action every X seconds. The value of X changes dynamically. I had problems when I considered how to change this interval on the fly at runtime. From what I can understand, the big breakthrough in my thinking was that Observables cannot change after they are defined, so trying to redefine Observalbe with a new interval value does not seem to be the right way for this.
I tried to work with the code located at https://www.learnrxjs.io/operators/transformation/switchmap.html.
So far, I think that switchMapat least on the right track. Can anyone give me an example or point me to resources that can help me?
At least the world definitely needs more examples of RxJs!
source
share