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

🚀[FEATURE]: Add ActionContext and ActionStatus to the public api #1637

Closed
karlhaas opened this issue Jul 1, 2020 · 4 comments
Closed

Comments

@karlhaas
Copy link

karlhaas commented Jul 1, 2020

Relevant Package

This feature request is for @ngxs/store

Description

Please add ActionContext and ActionStatus to the public API. The import:

import { ActionContext, ActionStatus } from '@ngxs/store/src/actions-stream';

worked in Angular v8 but not v10.

Describe the problem you are trying to solve

We have a special way to handle errors for which we observe the Actions stream an filter them manually. Therefore we use ActionContext and ActionStatus.

Describe the solution you'd like

Add ActionContext and ActionStatus to the public api:

export const enum ActionStatus {
Dispatched = 'DISPATCHED',
Successful = 'SUCCESSFUL',
Canceled = 'CANCELED',
Errored = 'ERRORED'
}
export interface ActionContext<T = any> {
status: ActionStatus;
action: T;
error?: Error;
}

@splincode
Copy link
Member

splincode commented Jul 5, 2020

@arturovt @markwhitfeld what do you think? I think we should do it

@arturovt
Copy link
Member

arturovt commented Jul 5, 2020

Interesting one. @karlhaas would you provide a minimal example? P.S. just out of curiosity

@arturovt
Copy link
Member

This has been fixed as part of the v3.7.4 release.
Please test this out and let us know if this is not resolved.

@markwhitfeld markwhitfeld modified the milestones: v3.7.4, v3.8.0 Mar 30, 2023
@markwhitfeld
Copy link
Member

Just a correction, this feature was only released in v3.8.0.

Please leave a comment in the #1985 if you come across any regressions with respect to your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants