I am currently "working" with vue. The store is updating my array, but does not update my string or boolean.
My code ist here:
i commit my string every second and the string does not show up at the frontend (vuex dev tools show the state is correct, my console log does not)
My Store looks like this:
const state: State = {
cars: [],
date: "false",
carsCounter: 0,
};
my export:
const getters = {
getCars(state: State) {
return state.cars;
},
getDate(state: State) {
return state.date;
},
getCarsCounter(state: State) {
return state.carsCounter;
}
};
const { read, commit, dispatch } = getStoreAccessors<State, State>("");
export const readCarsFromSse = read(getters.getCars);
export const readDate = read(getters.getDate);
export const readCarsCounter = read(getters.getCarsCounter);
and I use it in the date component like this:
export default class DateVue extends Vue {
date = readDate(store);
cars = readCarsFromSse(store);
testString = readCarsCounter(store);
mounted() {
Timeloader.loadTime();
}
}
did anyone know why the strings are not updated but the array is?
thanks
readfunction?const { read, commit, dispatch } = getStoreAccessors<State, State>("");