Subtle difference between map and pluck RxJS operators that you should know

Explanation in details about how map and pluck work, and then figuring out main difference between two operators

Photo by delfi de la Rua on Unsplash

How map operator works

map operator implementation

How pluck operator works

pluck calls map under the hood, with a difference
inside plucker function

Recap

source stream
stream with map
stream with pluck
this will give the same result as pluck

Conclusion

--

--

Angular Enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store