hello guys, how do I patch my state using setup Pinia store its working fine but not updating in vue dev-tools does that mean its not meant to complete replace the original state? #2501
Replies: 1 comment
-
After some research I found that we actually need to return a state form the pinia store for the state to be visible in Vue devtools extension on chrome |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
import { acceptHMRUpdate, defineStore } from "pinia";
import { computed, reactive, ref } from "vue";
export const MY_STORE = defineStore("my_store", () => {
const person = reactive({ name: "jack", age: "24" });
const $patch = () => {
person.name = "hello world";
console.log(person);
};
return {
$patch,
};
})
Beta Was this translation helpful? Give feedback.
All reactions