-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is the pluck deprecated? #5453
Comments
pluck('foo', 'bar', 'baz') and this would be fine even if the emitted value didn't have a With optional chaining this advantage is no longer true since you can now do map(x => x?.foo?.bar?.baz) And it will be as safe as the |
FWIW, deprecated parts of the API won't necessarily be removed in the very next major version of the library. ATM, one of the things on which we are working is improving the deprecation messages to make them easier to understand and to include links to the documentation to explain what is being deprecated and when it's likely to be removed. IMO, |
Just dropping my 2 cents here. As much as the code is equivalent and the usage of optional chaining is preferred, with the transition to It's mentally a lot easier to recognize a |
Pluck has a place, exactly like every other small method.
Good luck doing it with map. You're probably going to rewrite pluck by yourself. Sorry for being rude, but I find the ease of the RxJS team in deprecating methods disturbing. Removing pluck has NO BENEFIT FOR ANYONE. Cost of removal: need to update every (thousands, possibly millions) of applications using pluck. Same thing with the You are literally making my code legacy. Please, stop and remove the deprecations! |
Late to the party, but, I just wanted to echo this part ☝️ of @kolodny's argument for preferring |
I saw this commit and I'm wondering why
pluck
is deprecated? I couldn't find any issue where this is discussed.By the logic behind the explanation about using optional chaining, this means that you can easily deprecate lot's of other simple operators like
startWith
,endWith
,timestamp
and so on, because it's always possible to use pipe + something in case of these. I just wonder what's the reason behind deprecating this operator.The text was updated successfully, but these errors were encountered: