Skip to content
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

store pipe #876

Closed
juniur opened this issue Mar 1, 2018 · 6 comments
Closed

store pipe #876

juniur opened this issue Mar 1, 2018 · 6 comments

Comments

@juniur
Copy link

juniur commented Mar 1, 2018

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Feature request
[x ] Documentation issue or request

@ngrx/store

why using store.pipe(select(...)) instead of store.select?

can i request to have a documentation about this?

thanks,

juniur

@brandonroberts
Copy link
Member

We are following convention introduced in RxJS 5.5 for better operator support. https://github.com/ReactiveX/rxjs/blob/master/doc/pipeable-operators.md

@onedotover
Copy link

Using combineLatest with select is now a little more verbose. Something about this doesn't feel right. Is this the recommended way to use pipes with something like combineLatest?

Before

combineLatest(
  store.select(selectItemA),
  store.select(selectItemB),
).subscribe(...)

After

combineLatest(
  store.pipe(select(selectItemA)),
  store.pipe(select(selectItemB)),
).subscribe(...)

@vkiperman
Copy link

I'm refactoring to make my selects piped. However my tests fail. The output says that the Action in the reducer is undefined. Anyone else come across anything similar?

@timdeschryver
Copy link
Member

@vkiperman feel free to open up a new issue (with some code, or even better a reproduction) or hop into our gitter channel.

@Max101
Copy link

Max101 commented Feb 22, 2019

@brandonroberts could you explain why is this "consistent" with RxJs and why does it need to be consistent?
It makes no sense really to have this kind of consistency at the expense of cleaner code.
RxJs introduced pipes for one main purpose, tree-shaking. There is 99.9% no need for tree-shaking of the select method in NgRx. (There are other reasons yes for RxJs to do piping but they are not part of Rx)
Is there an exact timeline on when this is planned to be completely removed?

@timdeschryver
Copy link
Member

@Max101 we un-deprecated select, see #1382.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants