Inconsistent use of root: true for dispatching core actions in modules
See original GitHub issueObserved behavior
In many places where core actions (such as handleApiError
) are dispatched from within Vuex modules, no options object is passed with { root: true }
as recommended in the Vuex docs (and as implemented in some places of the code base).
Expected behavior
If this is required, then I assume it should be being used in all places where we are dispatching root actions within a module.
User-facing consequences
We might not actually catch errors, and just cause another error instead?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Is there a way to dispatch actions between two namespaced ...
E.g. I have Vuex modules "gameboard" and "notification". Each are namespaced. I would like to dispatch an action from the gameboard module in ......
Read more >Dispatching an action, inside another action of a different ...
I'm trying to dispatch an action inside another action from a different module. What does the proposed API look like? store/modules/users/index.
Read more >WebLogic Server Known and Resolved Issues
the tool attempts to activate a file specification named “true”, because the -nostage option takes no arguments and “true” is an extraneous string...
Read more >Using an NgRX Store Module in an Angular Application
The Store uses this method to allow components to dispatch actions to the Store. An action could, with an option, contain a payload....
Read more >vuex-resource-modules - npm Package Health Analysis | Snyk
A utility to generate RESTful modules for Vuex For more information about how to use this package see README. Latest version published 3...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There’s no harm in doing that. I think it might be time to make core a namespaced module as well, so it is more apparent why root: true is needed.
If you see
store.dispatch('core/handleApiError', error, { root: true })
inside of a module’s action, it will stand out more.totally agree