Add an operator alike Promise.then with two arguments #7137
yastanotheruser
started this conversation in
Ideas / Feature request
Replies: 1 comment 3 replies
-
You can use |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When migrating from Promises to RxJS observables it's recommended that
.then
chains be replaced with.flatMap
operators or any others depending on the case. However, there's currently no operator that does what would be equivalent to.then
with bothonFulfilled
andonRejected
callbacks. I guess that would be equivalent to a.map
operator that also takes two callbacks, one fornext
and other forerror
.A pipe with both a sequence of
.map
operators and a.catchError
operator would not behave the same, because errors thrown from the project function would be caught, whereas this does not happen when using a single.then
with Promises.Beta Was this translation helpful? Give feedback.
All reactions