@@ -56,16 +140,37 @@ console.log(testStore.countReactive.key);
{{ time.ref }}
+
+ {{ time.globalRef }}
+
+
+ {{ time.piniaRefStoreToRef }}
+
{{ time.piniaRef }}
+
+ {{ time.piniaRefOptionStoreToRef }}
+
+
+ {{ time.piniaRefOption }}
+
{{ time.reactive }}
+
+ {{ time.globalReactive }}
+
+
+ {{ time.piniaReactiveStoreToRef }}
+
{{ time.piniaReactive }}
+
+ {{ time.piniaReactiveOptionStoreToRef }}
+
+
+ {{ time.piniaReactiveOption }}
+
-
-
diff --git a/src/main.js b/src/main.js
index c9c896e..20e06ab 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,8 +1,11 @@
-import { createApp } from "vue";
+import { createApp, reactive, ref } from "vue";
import "./style.css";
import { createPinia } from "pinia";
import App from "./App.vue";
const pinia = createPinia();
-createApp(App).use(pinia).mount("#app");
+const app = createApp(App);
+app.config.globalProperties.$globalRef = ref(0);
+app.config.globalProperties.$globalReactive = reactive({ key: 0 });
+app.use(pinia).mount("#app");
diff --git a/src/useTestStore.js b/src/useTestStore.js
index 116a19e..45dc3d6 100644
--- a/src/useTestStore.js
+++ b/src/useTestStore.js
@@ -1,9 +1,8 @@
import { defineStore } from "pinia";
+import { reactive, ref } from "vue";
-export const useTestStore = defineStore("testStore", {
- state: () => {
- const count = 0;
- const countReactive = { key: 0 };
- return { count, countReactive };
- },
+export const useTestStore = defineStore("testStore", () => {
+ const count = ref(0);
+ const countReactive = reactive({ key: 0 });
+ return { count, countReactive };
});
diff --git a/src/useTestStoreOptions.js b/src/useTestStoreOptions.js
new file mode 100644
index 0000000..583ab7c
--- /dev/null
+++ b/src/useTestStoreOptions.js
@@ -0,0 +1,9 @@
+import { defineStore } from "pinia";
+
+export const useTestStoreOptions = defineStore("testStore", {
+ state: () => {
+ const count = 0;
+ const countReactive = { key: 0 };
+ return { count, countReactive };
+ },
+});