Skip to content

Undocumented selectors functionality in createSlice #51

Closed
@mattkahl

Description

@mattkahl

Thanks for the great tool! It uncovers some great existing utilities, provides some new ones, and sheds light on some useful idioms.

I had a question regarding createSlice. Having used a "ducks" structure previously, this was a great thing to uncover. And, naturally, I wondered why there wasn't an ability to also pass selectors into createSlice. However, I noticed that there is the ability to pass selectors into createSlice but it's undocumented. My only complaint about the functionality as it stands is that it modifies the name of selector. I understand why that happens for actions (and it makes it more readable to boot!), but I don't quite understand why that is needed for selectors.

So, two questions:

  1. Are you planning on exposing this functionality in the documentation? Or is it hidden for a reason?
  2. Would you be open to either (a) changing this functionality or (b) exposing createSliceSelector for import?

Thanks!

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