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

Implement Flux Standard Actions? #23

Open
orbiteleven opened this issue Mar 21, 2016 · 4 comments
Open

Implement Flux Standard Actions? #23

orbiteleven opened this issue Mar 21, 2016 · 4 comments

Comments

@orbiteleven
Copy link

Any interest in implementing Flux Standard Actions? https://github.com/acdlite/flux-standard-action

Selfishly this makes sense as I blend both redux-actions (https://github.com/acdlite/redux-actions) and redux-crud in my applications and would like a consistent action interface.

Understandably this would be a breaking change, but IMO worth it... if there's interest.

@sporto
Copy link
Contributor

sporto commented Mar 21, 2016

Maybe, what is the benefit? Interoperability?

One thing I don't agree is using the same action for the the event, the success and the error. Most likely if we use this we would keep using separate actions e.g. 'ON_FETCH_ERROR'.

@orbiteleven
Copy link
Author

The benefit would be standardization. As it is now, when dealing with redux-crud actions I look for action.action and action.record(s), but with redux-actions it's action.type and action.payload (or action.error). The standardization would be nice.

I imagine START|SUCCESS|ERROR actions would be independent. action.error is a boolean indicating this action is an error state. It can be used by middleware upstream.

@yoursdearboy
Copy link

@orbiteleven do you mean to just make START|SUCCESS|ERROR actions FSA compliant or replace them with sequence

{type: FETCH, meta: {sequence: 'start'}
{type: FETCH, payload: ...}
{type: FETCH, error: true, payload: error}

I like the second idea, because this three actions is the one, but it's a pain to monitor them.

@msaspence
Copy link

@sporto this would defeat the point imo, I wouldn't mind seeing a configuration option to allow for FSA

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

4 participants