Skip to content

Refactor docs from store.pipe(select(...)) to store.select(...) #2710

@alex-okrushko

Description

@alex-okrushko

I'm suggesting to use store.select as the recommended way to select from the Store.
This question is frequently asked - which way to use, and if I'm recommending store.select then why the docs have it otherwise?

The reasons why I suggest store.select are:

  • it's easier to mock for tests with a simple mock object
  • it's shorter to write
  • having a pipe select encourages further addition of other operators. That logic might be better handled in selector itself.

store.select was initially deprecated, and then un-deprecated - see some history here: #1361 (comment)

Other information:

I would be willing to submit a PR for the docs ❤️

[ ] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions