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

Make dispatch actions constants #1471

Open
manuelurenah opened this issue Jul 31, 2019 · 0 comments
Open

Make dispatch actions constants #1471

manuelurenah opened this issue Jul 31, 2019 · 0 comments

Comments

@manuelurenah
Copy link
Contributor

manuelurenah commented Jul 31, 2019

Is your feature request related to a problem? Please describe.

This is more a developer experience issue. None of the dispatch actions are being stored as constants, which makes them prone to mistyping and duplication.

Describe the solution you'd like

It'd be a good idea to have all dispatch actions stored as constants (the same way we have mutationTypes constants) to reduce duplication and errors.

Describe alternatives you've considered

  • N/A

Additional context

  • Rough example:
import { SAVE_USER } from './dispatchActions';

// Everything else...

this.$store.dispatch(SAVE_USER, usersData);
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

1 participant