0

I need to implement an observable that would ask to load data only if it's not already being loaded. I was thinking of having two observables: one for load requests and another for loading state. I'm not sure if the following scenario is possible and need your guidance:

load request observable: -- request -- skip whatever items unless state is False -- another request

Is loading state observable: -- True -------------------------------------------------------------False---

Thanks.

P.S. I wish the solution wouldn't contain side effects.

Community
  • 1
  • 1
midnight
  • 3,385
  • 3
  • 32
  • 57

1 Answers1

1

Here I gave an example for an image-caching solution which made sure images to a specific URL are loaded once.

Community
  • 1
  • 1
akarnokd
  • 64,441
  • 14
  • 138
  • 177