Nicholas Jamieson
1 min readJan 28, 2019

--

expand takes a concurrent parameter — with which you can limit the number of concurrent inner observables. Specifying 1 would limit the number of concurrent requests to the depth of your tree — i.e. one country at a time, one state at a time, etc.

Presumably, your API calls would be asynchronous, which means we’re talking about a heap limit, here, rather than a stack limit.

expand a pretty flexible operator. You can also use it to control back pressure — so the the countries and states, etc. that you are querying cannot be pushed into a consumer faster than they’re able to be consumed. I have a not-yet-finished article on that subject which I’ll publish soon. Hopefully. I’ve been pretty slack with the writing of articles, lately.

--

--

Nicholas Jamieson
Nicholas Jamieson

Written by Nicholas Jamieson

RxJS core team member; front-end developer; mentor; speaker; open-source contributor

Responses (1)