其他分享
首页 > 其他分享> > [RxJS] mergeMap, concatMap, exhaustMap: execute order

[RxJS] mergeMap, concatMap, exhaustMap: execute order

作者:互联网

mergeMap: order is not ensure

Depends on each request, the response order might not be the same as request.

 

concatMap: order is ensured

concatMap ensure the order is preserved

exhaustMap: ensure only first inner observable complete then trigger latest outer observable.

Which means, some outer observable will be ignored.

Use case: for delete operation, exhaustMap ensure only first click event request sent to server, ignore double click delete button cases.

source: https://www.youtube.com/watch?v=yjZM0LbVf7Q

标签:observable,execute,request,exhaustMap,concatMap,ensure,order
来源: https://www.cnblogs.com/Answer1215/p/16396476.html