Skip to content

It would be nice if each endpoint in an api object got unique fulfilled actions #4778

@steinarb

Description

@steinarb

In redux devtool on the webapp I'm currently in the process of transforming to RTK query, I see three interesting payloads go by, that I could have made use of in other reducers:
Image
Image
Image

Unfortunately they all have the same redux action type.

It's possible that one could look into the meta structure to find something to switch on, but:

  1. A lesson learned early in my redux use was that switching on something other than the type is a bad idea
  2. The meta data struture isn't easy to figure out and is probably intended to be opaque and will possibly/probably change without notice...?

But making the action type unique for each endpoint of the api object would make the redux value easy to use in other reducers.

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