I am utilizing Vue3 and Pinia for state management.
Here is an excerpt from my Pinia file:
export const useCounterStore = defineStore ({
id: 'statusData',
state: () => ({
test1: 25,
test2: 75
})
})
As for the template I am using:
<template>
<div>
{{ store.test1 }} {{ store.test2 }}
</div>
</template>
<script setup>
import { storeToRefs } from 'pinia';
import { useCounterStore } from '@/stores/statusData';
const store = useCounterStore();
const { test1, test2 } = storeToRefs(store);
</script>
Despite making manual changes in the 'statusData.js' file, the value remains unchanged in the template until the browser is reloaded.
If anyone has any insights on where the error might be originating from, please share your ideas.