Skip to content

Can we consider not removing selector with props? #3110

@yzhe554

Description

@yzhe554

Dear NGRX maintainers,

I have seen the recent changes for deprecating props from selector. #2980
The very first question is: do we need to write a factory selector when we want an argument? In another word, is props the same to arguments?
My understanding is No.
https://github.com/reduxjs/reselect/tree/v4.0.0#accessing-react-props-in-selectors
If you only display one single instance in the UI, you won't need a factory selector. It's adding a lot of complexities when you need to use it across multiple selectors/components. This is where props make things so easier.
If you will need to display multiple instances, like the example from reselect, yes, we cannot just use props here. This is where factory selectors come.
But it's really common in redux community that a better solution(rereselect) has been created.
https://redux.js.org/usage/deriving-data-selectors#re-reselect

I really suggest we reconsider this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions