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

Proposal: support overriding action name displayed in ReduxDevTools #205

Closed
hillin opened this issue Aug 31, 2021 · 2 comments
Closed

Proposal: support overriding action name displayed in ReduxDevTools #205

hillin opened this issue Aug 31, 2021 · 2 comments
Milestone

Comments

@hillin
Copy link

hillin commented Aug 31, 2021

Currently action names are generated from the action type name and its namespace. While this is good enough for most use cases, it's not friendly for generic actions, e.g.:

public record LoadSuccessAction<TPayload>(TPayload Data);

The proposal is to add an IOverrideActionName interface (or whatever name it is), so the action could specify its own name:

public record LoadSuccessAction<TPayload>(TPayload Data, string ActionName) : IOverrideActionName
{
    string IOverrideActionName.Name => this.ActionName;
}

This is important to for use cases like the AsyncLoadEffect mentioned in #203 (comment).

@mrpmorris mrpmorris added this to the 5.0 milestone Nov 3, 2021
@mrpmorris
Copy link
Owner

I assume it shows a weird auto-generated name? I could fix it to show LoadSuccessAction<Person> etc. Would you prefer that?

@hillin
Copy link
Author

hillin commented Nov 4, 2021

Yes currently it generates a name like LoadSuccessAction`1. I think LoadSuccessAction<Person> is good enough for this case.

mrpmorris added a commit that referenced this issue Jan 13, 2022
* Make generic action types in ReduxDevTools human readable #205
mrpmorris added a commit that referenced this issue Jan 13, 2022
* Remove need for index.js #235 (#236)

* Remove need for index.js (#235)

* Update to V5

* Separate IDispatcher / IStore #209 (#237)

* IStateSelector<TState, TValue> #221 (#238)

* Language version 9 features

* Added 5.0 breaking changes to releases

* Fix JS accidentally introduced error in ReduxDevTools middleware

* Make generic action types human readable in ReduxDevTools #205 (#249)

* Make generic action types in ReduxDevTools human readable #205

* Move actions to common folder in tutorials #250 (#251)

* Update versions to 5.0.0
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

2 participants