This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Example using vuex modules #794
Comments
/src/renderer/views/Welcome.vue
then use Also maybe need to fix persistedState in src\renderer\store\index.js
|
Still lost, I got this error:
|
|
[vuex] module namespace not found in mapActions(): Counter [vuex] module namespace not found in mapActions(): Address <template>
<div class="b-view">
...
</div>
</template>
<script>
import { createNamespacedHelpers } from 'vuex';
import Viewer from './Viewer';
import DTabPane from './tabs/pane';
const { mapState, mapActions, mapGetters } = createNamespacedHelpers('Address');
export default {
name: 'BrowserView',
components: {
DTabPane,
Viewer,
},
data() {
return {
};
methods: {
...mapActions(['ADDRESS_UPDATE']),
onDidNavigate(event) {
this.ADDRESS_UPDATE(event.url);
},
},
};
</script>
|
Lionad-Morotar
added a commit
to Lionad-Morotar/media-gear
that referenced
this issue
Mar 23, 2019
I was able to get this approach to work as well, but what if you want to use multiple modules in the same vue file? For example from the code above I want to access both the Counter and Address modules in the same file. |
Just a quick note that
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've used Vuex before but never in this module sense. I am purely trying to use the vuex Counter that this package ships with. I've tried the following to no resolve any help would be nice.
/src/renderer/store/modules/Counter.js
/src/renderer/views/Welcome.vue
The text was updated successfully, but these errors were encountered: