All Questions
6 questions
1
vote
2
answers
4k
views
Vue.js: Show/Hide buttons on navbar based on Vuex Store state when the user is logged in or not
I'm creating a navbar that shows or hides buttons depending if the user is logged in or not.
For that, I'm saving the state on Vuex and localStorage.
I'm trying to build a dynamic menu, using a list ...
0
votes
1
answer
827
views
Vuex - Modify state objects only on getters
I have a lot of state modules with relations, here are two of my main states:
channels.js
const state = {
channels: [
{
id: 1,
name: 'E-mail'
},
{
...
8
votes
1
answer
8k
views
Vuex - Run function after multiple dispatches
I'm creating an application and at a certain point I need to load some data, but for the user not to see broken data I'm inserting a loading component.
Currently I put a setTimeout in the load, but ...
1
vote
3
answers
3k
views
Vm is not defined - vueJS with vueCLI
I'm using vue-cli for my project. vue-route and vuex also added to project. Routes working nice. while I checking vuex store data in route, I getting vm is not defined error. You can find the code ...
5
votes
3
answers
2k
views
How do I ensure the vuex store gets included in my build?
I have a Vue application that is using vue cli 3. I'm following the guide here to try building my app with vue-cli-service build --target wc --name my-element [entry]
To test the output, I have an ...
0
votes
1
answer
458
views
how to change VUE main.js to use routers/index.js
Why does the VUE UI main.js code generated by CLI/3 differ from the older syntax, what are its parts and how does it work?
sync(store, router) // for vuex-router-sync
new Vue({
router,
store,
...