question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistent use of root: true for dispatching core actions in modules

See original GitHub issue

Observed 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:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jonboisercommented, Sep 20, 2018

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.

0reactions
indirectlylitcommented, Sep 20, 2018

I think it might be time to make core a namespaced module as well

totally agree

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found