\n\u003C/template>\n\u003Cscript>\nconst role = [\n name: 'thisIsName',\n extra: {\n uuidOnlyInFe: 'xxx'\n }\n]\n\u003C/script>\n```\n\nSo I had to, once again, deconstruct. But this also brought about problems.\n```js\n// modelValue expect `[ name: 'thisIsName', extra: { uuidOnlyInFe: 'xxx' } ]`\nconst { name, extra } = vueuse.toRefs(modelValue)\nconst { uuidOnlyInFe } = vueuse.toRefs(extra)\nname.value = 123 // not work\nuuidOnlyInFe.value = 'xxx' // work\n```\n\n**Reproduction**: [play](https://play.vuejs.org/#eNqNVdtu2zgQ/ZVZvdgGbClBtnnQ2kG7aRZIsU2LJrsvVdGo0ihhLJEESfkCw//eQ8py3DZpCwQKOTOcOXM73kSvtI4XLUdpNLWFEdqRZdfqs0yKRivjaENFa51qPnA1JuM/y9wV92NS8q1qpeOStlQZ1dAAfgb7d+eq0Z08i+LE33ycLMpkJgslraOiVpJfM2uaEdPsjN5cv7uKdW4sD8PROiPknajWQx6N+levL/559d+/N5+9BR5+3JBOPciUBkIKdz6g7Zhk3vBOcIUjZJ/6947xmflMhnsAw0OnPlQmk4QuK3L3whL+ShiOcWNqLZOq6NYpFMQOG1Vy/X9etxwv/Hd0S0KG3H22tBR1TV+4UA1DzlXFhRMLjjOJKt+IhlXrhsORT36TSULQ61ZrhRiIZfDGUk6lyZdsCE40YEhHXhXTxYLNmhyckHDeUmmWXI7xQvIS5nrtkXrQZe5ybwGZQL9CV96jODmAhIJ04FGWZ0qSSRT1xdFRKM006SYFM4KL40bXuWPciKalWMBHbu0si5Ym15pNFgXVTrmYVMpAORR4OCZRrka+Yh5EFlE65zWUkOJi3bpm3EphEWGdVjWv/tp7I/823Wz8P9pup2HeFpPQkNS7w0v/7yP0n/BqGmawh5IAS8Afbr2YCNOHCmOgNt2gbLd7o6Sz6p9Ok4PMcQ1ocYx3aYeGUo+dOvCQ+MOkFMZPgpIpelK3jQyqvBZ3cuILYyEHDjZB/oAFxBZMMMAuoNvrgA7dCJGjceQsLCpxFz9YJbHRAUEW+cERNZt32ke0WYT0upyyKK9rtXwTZM60PO7lxT0X8yfkDxadSXF4b9iyWWCh9zqXmztGF7364vqKVzjvlehLW8P6J8oPbFELj7Ez+7uVJWAf2AW0l4FfQAw39mKFetg+KQ/UW26DfRZhAX3Ln0v9Ee5J/Gd4h3qiiv3y/owSdxRYcoWtfutHrifBEDaL0Bss896+Y4unifIH7UuoQTNJoYw3+464DmIOB142CEvZ2YAMO/KDs9nO79AbwQZ4fmE0hsow5rVALyrMbF6DibYjz0uXriOzpTLzx2jFoQsdgDxJbCHcnmQGYbpOT0+RHXnnqHeg0MIrPRI9CPJvgxIVjy7OUQFRgc0GvaGSA/818z8o+AcrpnQb8pzNDoPe7qL+iPQwgIdR4IfjiezBhcdHv0mGPYl9UaZkk9KxXhHGXJSkhZw/cqM+0zPPOhqU03UnXLs2bXvy6QqZ0lRI3bqe7uDei0GZyfMUhcnuBm7S5Po7hugU367H4RR2+3jvnLZpkrRSz+9isEpyaPPy+CQ+jo8SIUtexc0DvO33trez96DX8lfeOqsn/B0s6Wf8+PnFRw4n8Yv4+CTafgVmru2y)\n\nAfter repeated debugging, it was found that if `replaceRef: true` (the default value) is used to use `vueuse.toRefs`, it will result in two `customRef.set` operations.\nHowever, the problem lies in the second `customRef.set`, which uses the data before `name.value = 123` to construct [newObject](https://github.com/vueuse/vueuse/blob/39274b09660de91a1090b07134476ef417a9a1db/packages/shared/toRefs/index.ts#L46), thereby overwriting the modification made in the previous line.\n\n---\nVersion 3: This is a temporary solution `vueuse.toRefs(modelValue, { replaceRef: false })`\nHowever, what I'm unsure about is whether `replaceRef: false` might cause any other bugs\n\n### Reproduction\n\nhttps://play.vuejs.org/#eNqNVdtu2zgQ/ZVZvdgGbClBtnnQ2kG7aRZIsU2LJrsvVdGo0ihhLJEESfkCw//eQ8py3DZpCwQKOTOcOXM73kSvtI4XLUdpNLWFEdqRZdfqs0yKRivjaENFa51qPnA1JuM/y9wV92NS8q1qpeOStlQZ1dAAfgb7d+eq0Z08i+LE33ycLMpkJgslraOiVpJfM2uaEdPsjN5cv7uKdW4sD8PROiPknajWQx6N+levL/559d+/N5+9BR5+3JBOPciUBkIKdz6g7Zhk3vBOcIUjZJ/6947xmflMhnsAw0OnPlQmk4QuK3L3whL+ShiOcWNqLZOq6NYpFMQOG1Vy/X9etxwv/Hd0S0KG3H22tBR1TV+4UA1DzlXFhRMLjjOJKt+IhlXrhsORT36TSULQ61ZrhRiIZfDGUk6lyZdsCE40YEhHXhXTxYLNmhyckHDeUmmWXI7xQvIS5nrtkXrQZe5ybwGZQL9CV96jODmAhIJ04FGWZ0qSSRT1xdFRKM006SYFM4KL40bXuWPciKalWMBHbu0si5Ym15pNFgXVTrmYVMpAORR4OCZRrka+Yh5EFlE65zWUkOJi3bpm3EphEWGdVjWv/tp7I/823Wz8P9pup2HeFpPQkNS7w0v/7yP0n/BqGmawh5IAS8Afbr2YCNOHCmOgNt2gbLd7o6Sz6p9Ok4PMcQ1ocYx3aYeGUo+dOvCQ+MOkFMZPgpIpelK3jQyqvBZ3cuILYyEHDjZB/oAFxBZMMMAuoNvrgA7dCJGjceQsLCpxFz9YJbHRAUEW+cERNZt32ke0WYT0upyyKK9rtXwTZM60PO7lxT0X8yfkDxadSXF4b9iyWWCh9zqXmztGF7364vqKVzjvlehLW8P6J8oPbFELj7Ez+7uVJWAf2AW0l4FfQAw39mKFetg+KQ/UW26DfRZhAX3Ln0v9Ee5J/Gd4h3qiiv3y/owSdxRYcoWtfutHrifBEDaL0Bss896+Y4unifIH7UuoQTNJoYw3+464DmIOB142CEvZ2YAMO/KDs9nO79AbwQZ4fmE0hsow5rVALyrMbF6DibYjz0uXriOzpTLzx2jFoQsdgDxJbCHcnmQGYbpOT0+RHXnnqHeg0MIrPRI9CPJvgxIVjy7OUQFRgc0GvaGSA/818z8o+AcrpnQb8pzNDoPe7qL+iPQwgIdR4IfjiezBhcdHv0mGPYl9UaZkk9KxXhHGXJSkhZw/cqM+0zPPOhqU03UnXLs2bXvy6QqZ0lRI3bqe7uDei0GZyfMUhcnuBm7S5Po7hugU367H4RR2+3jvnLZpkrRSz+9isEpyaPPy+CQ+jo8SIUtexc0DvO33trez96DX8lfeOqsn/B0s6Wf8+PnFRw4n8Yv4+CTafgVmru2y\n\n### System Info\n\n```Shell\nvue: v3.5.13\nvueuse: 13.1.0\n```\n\n### Used Package Manager\n\nnpm\n\n### Validations\n\n- [x] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\n- [x] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\n- [x] Read the [docs](https://vueuse.org/guide).\n- [x] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\n- [x] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\n- [x] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\n- [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[2876],{"name":2877,"color":2878},"pending triage","d73a4a",4771,"BUG | `toRefs` | When nested, the inner and outer layer fields cannot be updated simultaneously.","2025-05-23T04:36:26Z","https://github.com/vueuse/vueuse/issues/4771",0.7251359,{"description":2885,"labels":2886,"number":2887,"owner":2866,"repository":2866,"state":2888,"title":2889,"updated_at":2890,"url":2891,"score":2892},"### Describe the bug\r\n\r\n`logicAnd` when used with `whenever` triggers even though the value in store is `false`.\r\n\r\n```js\r\nimport { useMagicKeys, whenever } from '@vueuse/core';\r\nimport { logicAnd } from '@vueuse/math';\r\nimport { useAppStore } from './mystore.js';\r\n\r\nconst appState = useAppStore();\r\nconst { Shift_A } = useMagicKeys();\r\nwhenever(logicAnd(Shift_A, appState.isGlobalShortcut), () => {\r\n // This will be trigged even though the value of `appState.isGlobalShortcut` is `false`.\r\n});\r\n```\r\n\r\n```js\r\n// contents of ./mystore.js'\r\nimport { defineStore } from 'pinia';\r\n\r\nexport const useAppStore = defineStore({\r\n id: 'app',\r\n state: () => ({\r\n // Keyboard Shortcuts enable/disable Tracking\r\n isGlobalShortcut: false,\r\n }),\r\n});\r\n```\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/vitejs-vite-jpn1ul?embed=1&file=src%2FApp.vue\r\n\r\n### System Info\r\n\r\n```Shell\r\nSystem:\r\n OS: Linux 5.0 undefined\r\n CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\r\n Memory: 0 Bytes / 0 Bytes\r\n Shell: 1.0 - /bin/jsh\r\n Binaries:\r\n Node: 18.18.0 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 9.4.2 - /usr/local/bin/npm\r\n pnpm: 8.6.12 - /usr/local/bin/pnpm\r\n npmPackages:\r\n @vueuse/core: ^7.6.2 => 7.6.2 \r\n @vueuse/math: ^10.4.1 => 10.4.1 \r\n vue: ^3.2.25 => 3.3.4 \r\n\r\n```\r\n\r\n\r\n\r\n### Used Package Manager\r\n\r\nnpm\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\r\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://vueuse.org/guide).\r\n- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\r\n- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\r\n- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\r\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],3452,"closed","logicAnd does not work with Pinia Store","2023-10-06T07:57:57Z","https://github.com/vueuse/vueuse/issues/3452",0.6977767,{"description":2894,"labels":2895,"number":2896,"owner":2866,"repository":2866,"state":2888,"title":2897,"updated_at":2898,"url":2899,"score":2900},"### Describe the bug\n\n> 版本\r\n `\r\n \"@vueuse/core\": \"^10.5.0\",\r\n \"vue\": \"^2.6.10\",\r\n`\r\n我的代码:\r\n\r\n> parentView 父组件\r\n```js\r\n\r\n\u003Cchild-view v-model=\"name\"/>\r\n\r\n```\r\n\r\n> childView 子组件\r\n```js\r\nexport default {\r\n props: ['value'],\r\n emits: [\"input\"],\r\n setup(props, {emit}) {\r\n const nameProp = useVModel(props, \"value\", emit)\r\n useTimeout(1000, {\r\n callback: () => {\r\n nameProp.value = 'danke'\r\n }\r\n })\r\n}\r\n```\r\n\r\n2.x的项目 useVModel(props, \"value\", emit) 这样写的话 一直会出现不能更新值的问题 \r\n\r\n看了下源码 如果修改为useVModel(props, null, emit) key=null的时候 才可以测试通过 \r\n\r\n\r\n\r\n现在这样修改表现 但是觉得很奇怪。。。麻烦帮我看下这个问题 谢谢啦~\r\n```js\r\nexport default {\r\n props: ['value'],\r\n emits: [\"input\"],\r\n setup(props, {emit}) {\r\n const nameProp = useVModel(props, null , emit)\r\n useTimeout(1000, {\r\n callback: () => {\r\n nameProp.value = 'danke'\r\n }\r\n })\r\n}\r\n```\n\n### Reproduction\n\n见上述例子\n\n### System Info\n\n```Shell\nSystem:\r\n OS: Windows 10 10.0.19044\r\n CPU: (16) x64 AMD Ryzen 7 5700U with Radeon Graphics\r\n Memory: 3.35 GB / 31.35 GB\r\n Binaries:\r\n Node: 16.20.1 - D:\\nodejs\\node.EXE\r\n Yarn: 1.22.19 - ~\\AppData\\Roaming\\npm\\yarn.CMD\r\n npm: 8.18.0 - D:\\nodejs\\npm.CMD\r\n pnpm: 8.6.11 - ~\\AppData\\Roaming\\npm\\pnpm.CMD\r\n Browsers:\r\n Edge: Spartan (44.19041.1266.0), Chromium (118.0.2088.76)\r\n Internet Explorer: 11.0.19041.1566\n```\n\n\n### Used Package Manager\n\nnpm\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://vueuse.org/guide).\n- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\n- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\n- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],3523,"vue2.x下 使用useVModel 不能双向绑定","2024-01-09T03:23:43Z","https://github.com/vueuse/vueuse/issues/3523",0.7007004,{"description":2902,"labels":2903,"number":2904,"owner":2866,"repository":2867,"state":2888,"title":2905,"updated_at":2906,"url":2907,"score":2908},"I'm trying to set up a component library with vue-demi (Vite + Vue 3 + Setup Script). Importing thing work fine in Vue 3 apps, but fail for Vue 2. The resulting bundle looks like this:\r\n\r\nBaseButton.vue to be imported by Vue2/3 App\r\n```vue\r\n\u003Cscript setup lang=\"ts\">\r\nimport { ref } from \"vue-demi\";\r\n\r\ndefineProps({\r\n label: {\r\n type: String,\r\n default: \"\",\r\n },\r\n});\r\n\r\nconst counter = ref(0);\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003Clabel>\r\n {{ label }}\r\n {{ counter }}\r\n \u003Cbutton v-bind=\"$attrs\" @click=\"counter++\">\r\n \u003Cslot />\r\n \u003C/button>\r\n \u003C/label>\r\n\u003C/template>\r\n```\r\n\r\nBuild output:\r\n```js\r\nimport { defineComponent, ref, openBlock, createElementBlock, createTextVNode, toDisplayString, createElementVNode, mergeProps, renderSlot } from \"vue\";\r\nconst _sfc_main = /* @__PURE__ */ defineComponent({\r\n props: {\r\n label: {\r\n type: String,\r\n default: \"\"\r\n }\r\n },\r\n setup(__props) {\r\n const counter = ref(0);\r\n return (_ctx, _cache) => {\r\n return openBlock(), createElementBlock(\"label\", null, [\r\n createTextVNode(toDisplayString(__props.label) + \" \" + toDisplayString(counter.value) + \" \", 1),\r\n createElementVNode(\"button\", mergeProps(_ctx.$attrs, {\r\n onClick: _cache[0] || (_cache[0] = ($event) => counter.value++)\r\n }), [\r\n renderSlot(_ctx.$slots, \"default\")\r\n ], 16)\r\n ]);\r\n };\r\n }\r\n});\r\nexport { _sfc_main as BaseButton };\r\n```\r\n\r\nIn Vue 2 I run into `Uncaught TypeError: Object(...) is not a function` error with `defineComponent()`. I suppose it should be importing from \"vue-demi\" instead of \"vue\"?\r\n\r\nPackage.json\r\n```json\r\n\"dependencies\": {\r\n \"vue-demi\": \"^0.12.4\"\r\n },\r\n \"devDependencies\": {\r\n \"@types/node\": \"^17.0.21\",\r\n \"@vitejs/plugin-vue\": \"^2.2.0\",\r\n \"@vue/composition-api\": \"^1.4.9\",\r\n \"typescript\": \"^4.5.4\",\r\n \"vite\": \"^2.8.0\",\r\n \"vue\": \"^3.2.25\",\r\n \"vue-tsc\": \"^0.29.8\"\r\n },\r\n \"peerDependencies\": {\r\n \"@vue/composition-api\": \"^1.0.0-rc.1\",\r\n \"vue\": \"^2.0.0 || >=3.0.0\"\r\n },\r\n \"peerDependenciesMeta\": {\r\n \"@vue/composition-api\": {\r\n \"optional\": true\r\n }\r\n },\r\n```\r\n\r\nvite.config.ts\r\n```ts\r\nexport default defineConfig({\r\n plugins: [vue()],\r\n build: {\r\n lib: {\r\n entry: path.resolve(__dirname, \"src/lib.ts\"),\r\n name: \"myLib\",\r\n fileName: (format) => `lib.${format}.js`,\r\n },\r\n rollupOptions: {\r\n // make sure to externalize deps that shouldn't be bundled\r\n // into your library\r\n external: [\"vue\"],\r\n output: {\r\n // Provide global variables to use in the UMD build\r\n // for externalized deps\r\n globals: {\r\n vue: \"Vue\",\r\n },\r\n },\r\n },\r\n },\r\n optimizeDeps: {\r\n exclude: [\"vue-demi\"],\r\n },\r\n});\r\n```",[],145,"Not running on Vue 2 App","2022-09-04T15:48:05Z","https://github.com/vueuse/vue-demi/issues/145",0.7046454,{"description":2910,"labels":2911,"number":2912,"owner":2866,"repository":2866,"state":2888,"title":2913,"updated_at":2914,"url":2915,"score":2916},"I'm facing the following issue when trying to build a project with vite `2.4.3` using vueuse `6.0.0`. \r\n\r\n```\r\n'effectScope' is not exported by node_modules/@vueuse/core/node_modules/vue-demi/lib/index.mjs, imported by node_modules/@vueuse/core/node_modules/@vueuse/shared/index.esm.js\r\nfile: .../node_modules/@vueuse/core/node_modules/@vueuse/shared/index.esm.js:1:64\r\n1: import { computed, unref, watch, ref, customRef, isVue3, isRef, effectScope, onScopeDispose, reactive, toRef, isVue2, toRefs as toRefs$1, getCurrentInstance, onMounted, nextTick, getCurrentScope, onUnmounted } from 'vue-demi';\r\n ^\r\n2: \r\n3: /**\r\nerror during build:\r\nError: 'effectScope' is not exported by node_modules/@vueuse/core/node_modules/vue-demi/lib/index.mjs, imported by node_modules/@vueuse/core/node_modules/@vueuse/shared/index.esm.js\r\n at error (/node_modules/rollup/dist/shared/rollup.js:151:30)\r\n at Module.error (/node_modules/rollup/dist/shared/rollup.js:10044:16)\r\n at Module.traceVariable (/node_modules/rollup/dist/shared/rollup.js:10429:29)\r\n at ModuleScope.findVariable (/node_modules/rollup/dist/shared/rollup.js:9200:39)\r\n at FunctionScope.findVariable (/node_modules/rollup/dist/shared/rollup.js:3635:38)\r\n at ChildScope.findVariable (/node_modules/rollup/dist/shared/rollup.js:3635:38)\r\n at Identifier.bind (/node_modules/rollup/dist/shared/rollup.js:4572:40)\r\n at CallExpression.bind (/frontend/node_modules/rollup/dist/shared/rollup.js:2886:23)\r\n at CallExpression.bind (/frontend/node_modules/rollup/dist/shared/rollup.js:7133:15)\r\n at VariableDeclarator.bind (/node_modules/rollup/dist/shared/rollup.js:2886:23)\r\n```",[],686,"'effectScope' is not exported by vue-demi/lib/index.mjs","2021-09-07T09:34:58Z","https://github.com/vueuse/vueuse/issues/686",0.7074003,{"description":2918,"labels":2919,"number":2920,"owner":2866,"repository":2866,"state":2888,"title":2921,"updated_at":2922,"url":2923,"score":2924},"### Describe the bug\r\n\r\nI'm using pinia as my state management engine, and I'm passing in an object from the store into a component as a `v-model` prop, which is then bound to a local variable using `useVModel` with the `{ deep: true }` option. I also have a vue watcher set up to watch for changes made to this state object. I then update said object inside the component by updating a property within `.value`.\r\n\r\n#### Expected:\r\nStore property is updated, watcher event handler is fired, and a simple equality test returns false.\r\n\r\n#### Actual:\r\nStore property is updated, watcher event handler is fired, and a simple equality test returns TRUE.\r\n\r\nI've attached a link to a minimal reproduction app that demonstrates this. I've included an alternative method for updating the `v-model` value within a component using the standard `emit` method. I've also include a pinia store subscription that logs out all mutations. All this can be used to confirm that the problem lies with `useVModel`.\r\n\r\n### Reproduction\r\n\r\nhttps://codesandbox.io/p/sandbox/pedantic-satoshi-ulvp06\r\n\r\n### System Info\r\n\r\n```Shell\r\nSystem:\r\n OS: Linux 5.15 Debian GNU/Linux 11 (bullseye) 11 (bullseye)\r\n CPU: (2) x64 AMD EPYC\r\n Memory: 2.63 GB / 3.84 GB\r\n Container: Yes\r\n Shell: 5.1.4 - /bin/bash\r\n Binaries:\r\n Node: 16.17.0 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 8.15.0 - /usr/local/bin/npm\r\n Watchman: 20220528.183901.0 - /usr/local/bin/watchman\r\n npmPackages:\r\n @vueuse/core: ^9.12.0 => 9.12.0 \r\n vue: 3.2.45 => 3.2.45\r\n```\r\n\r\n\r\n### Used Package Manager\r\n\r\nnpm\r\n\r\n### Validations\r\n\r\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\r\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\r\n- [X] Read the [docs](https://vueuse.org/guide).\r\n- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\r\n- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\r\n- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\r\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],2712,"[useVModel] value and oldValue are equal inside a watcher when using useVModel on objects","2023-04-21T09:22:01Z","https://github.com/vueuse/vueuse/issues/2712",0.7102398,{"description":2926,"labels":2927,"number":1598,"owner":2866,"repository":2867,"state":2888,"title":2928,"updated_at":2929,"url":2930,"score":2931},"Hello @antfu ,\r\n\r\nI am currently working on a SPA using `vue2` + `options-api` . This SPA imports another component library (`vue2` + `@vue/composition-api`), which simply exposes a single vue component. The component library also uses `@vueuse/core` using `vue-demi`.\r\n\r\nHere's an example of the exported component of the library (can not share everything since it's an company internal project)\r\n```vue\r\n\u003Ctemplate>\r\n \u003Cdiv>\r\n \u003Cp>FOO: {{ blub }}\u003C/p> \u003C!-- will stay false -->\r\n \u003Cbutton @click.stop=\"click\">CLICK ME\u003C/button>\r\n \u003C/div>\r\n\u003C/template>\r\n\r\n\u003Cscript>\r\nimport { defineComponent, ref } from \"@vue/composition-api\"\r\nimport { useLocalStorage } from \"@vueuse/core\"\r\n\r\nexport default defineComponent({\r\n setup: (props) => {\r\n const foo = ref(false)\r\n\r\n const storageLocale = useLocalStorage(\"some_key\", \"en-GB\", {\r\n listenToStorageChanges: true,\r\n window,\r\n })\r\n\r\n return {\r\n foo,\r\n click: () => {\r\n console.log(\"before click\", foo.value)\r\n foo.value = true\r\n console.log(\"after click\", foo.value) // \u003C-- will be true\r\n },\r\n }\r\n },\r\n})\r\n\u003C/script>\r\n```\r\n\r\nSo basically everything works pretty good. But as soon as I add the `useLocalStorage` or any other composable from `@vueuse/core`, the template will not re-render as soon as the button was clicked. The ref value itself works, only the template does not update. I did a lot of debugging together with my colleague, and we figured out that the template will update, as soon as we get rid of all `vue-demi` based code.\r\n\r\nDependencies of the SPA:\r\n```json\r\n\"dependencies\": {\r\n \"vue\": \"^2.6.10\",\r\n \"@company/components\": \"1.0.0\",\r\n \"@vue/composition-api\": \"1.0.0-beta.25\"\r\n},\r\n\"devDependencies\": {\r\n ... all other\r\n}\r\n``` \r\nDependencies of the ComponentLibrary: \r\n```json\r\n\"dependencies\": {\r\n \"@vueuse/core\": \"4.0.10\"\r\n},\r\n\"devDependencies\": {\r\n \"vue\": \"^2.6.10\",\r\n \"@vue/composition-api\": \"1.0.0-beta.25\"\r\n ... all other\r\n}\r\n```\r\n\r\nDo you know what could be the issue here?\r\n\r\nKind regards,\r\nLukas",[],"vue-demi breaks composition-api template re-rendering (vue2)","2021-02-06T14:34:10Z","https://github.com/vueuse/vue-demi/issues/35",0.7115586,{"description":2933,"labels":2934,"number":2935,"owner":2866,"repository":2867,"state":2888,"title":2936,"updated_at":2937,"url":2938,"score":2939},"unfortunately, the issue reported in https://github.com/vueuse/vue-demi/issues/224 still exists in vue-demi 0.14.3 / pinia 2.1.1.\r\n\r\nMy previous example only used the iife version of vue-demi, but another error breaks pinia in the cjs and mjs versions of vue-demi.\r\n\r\ncodesandbox with Pinia 2.0.33 (working):\r\nhttps://codesandbox.io/s/pinia-2-0-33-vue-2-7-14-7tom1g\r\ncodesandboxwith Pinia 2.1.1 (broken):\r\nhttps://codesandbox.io/s/pinia-2-1-1-vue-2-7-14-c0gdvx\r\n\r\nI hope, this helps :)",[],228,"Vue 2.7: Error \"VueCompositionAPI is not defined\" in hasInjectionContext() still exists in vue-demi 0.14.3","2023-05-18T06:14:54Z","https://github.com/vueuse/vue-demi/issues/228",0.7162244,{"description":2941,"labels":2942,"number":2943,"owner":2866,"repository":2867,"state":2888,"title":2944,"updated_at":2945,"url":2946,"score":2947},"I am using Vue 2.7.14\r\n\r\nSince upgrading pinia from 2.0.36 to 2.1.0, I get the following error, originating from vue-demi:\r\n\r\n\r\n\r\nPinia 2.0 does not produce this issue, as it used `hasInjectionContext` from the vue package instead of vue-demi (see https://github.com/vuejs/pinia/commit/915e754d3669f2d532bcb92ece9e4ea7dcd23240)\r\n\r\nJSFiddle with Pinia 2.0 (working):\r\nhttps://jsfiddle.net/mk56hoqe/2/\r\nJSFiddle with Pinia 2.1 (broken):\r\nhttps://jsfiddle.net/egay83mp/4/",[],224,"Vue 2.7: Error \"VueCompositionAPI is not defined\" in hasInjectionContext()","2023-05-17T14:43:02Z","https://github.com/vueuse/vue-demi/issues/224",0.7171088,["Reactive",2949],{},["Set"],["ShallowReactive",2952],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$flRlm8YYUeIPxX0GNe55A068LJjh9LkUEHfeFROTtX_8":-1},"/vueuse/vue-demi/205"]