I have an observable that is supposed to complete an action every X seconds. The value of X changes dynamically. I have been having trouble wrapping my head around how to change this interval on the fly at run time. From what I can understand, a big breakthrough in my thinking has been that Observables cannot change once they are defined, so trying to redefine the Observalbe with a new interval value does not seem like the correct way to go about it.
I have been trying to work with the code located at https://www.learnrxjs.io/operators/transformation/switchmap.html
So far, I think that switchMap is at least on the right track. Would anyone be able to provide an example or point me to resources that might help me?
At the very least, the world definitely needs more RxJs examples!