\n\n### Reproduction\n\nhttps://stackblitz.com/edit/vitejs-vite-m1bs1kix?file=src%2FApp.vue\n\n### System Info\n\n```Shell\nSystem:\n OS: Windows 11 10.0.22631\n CPU: (16) x64 AMD Ryzen 7 8845HS w/ Radeon 780M Graphics\n Memory: 12.32 GB / 31.31 GB\nBinaries:\n Node: 22.15.1 - D:\\Program Files\\nodejs\\node.EXE\n npm: 10.9.2 - D:\\Program Files\\nodejs\\npm.CMD\n pnpm: 10.12.2 - D:\\Program Files\\nodejs\\pnpm.CMD\nBrowsers:\n Edge: Chromium (127.0.2651.98)\n Internet Explorer: 11.0.22621.3527\nnpmPackages:\n @vueuse/core: ^13.4.0 => 13.4.0\n vue: v3.6.0-alpha.1 => 3.6.0-alpha.1\n```\n\n### Used Package Manager\n\npnpm\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.",[3019],{"name":3020,"color":3021},"pending triage","d73a4a",4875,"vueuse","open","BUG | `provideLocal` and `injectLocal` | In Vue's vapor mode, `getCurrentInstance` returns `null`","2025-07-14T06:38:22Z","https://github.com/vueuse/vueuse/issues/4875",0.7197556,{"description":3030,"labels":3031,"number":3032,"owner":3023,"repository":3033,"state":3034,"title":3035,"updated_at":3036,"url":3037,"score":3038},"Hi @antfu, big thanks for providing Vue Demi.\r\n\r\nSince the breaking change introduced in [Vue Composition API 1.0.0-beta.22](https://github.com/vuejs/composition-api/blob/master/CHANGELOG.md#100-beta22-2020-12-19) `getCurrentInstance` only works with the following workaround in Vue 3:\r\n\r\n```\r\nconst vm = isVue3 ? getCurrentInstance() : getCurrentInstance().proxy\r\nconst lazy = vm.attrs.modelModifiers.lazy // will crash with getCurrentInstance().proxy\r\n```",[],23,"vue-demi","closed","getCurrentInstance broken with Vue Composition API 1.0.0-beta.22","2020-12-24T14:07:30Z","https://github.com/vueuse/vue-demi/issues/23",0.680247,{"description":3040,"labels":3041,"number":3042,"owner":3023,"repository":3023,"state":3034,"title":3043,"updated_at":3044,"url":3045,"score":3046},"Upgrading from @vueuse/core ^4.11.0 -> @vueuse/core ^7.3.0 results in the title error\r\n\r\n\r\n\r\n\r\nRunning \r\n`npx vue-demi-fix` or `npx vue-demi-switch 2`\r\nDoes not fix the issue.\r\n\r\nApplication is running\u003Cbr/>\r\n`\"vue\":\"^2.6.14\"`\r\n`\"@vue/composition-api\":\"^1.4.1\"`\r\n\r\nCan anyone advise?\r\n\r\nMy only resolution atm is to downgrade and duplicate vueUse functionality intending for use.\r\n",[],1070,"Vue2 + Vue composition-api: Error in data(): \"TypeError: vueDemi.getCurrentScope is not a function\"","2022-09-21T19:28:08Z","https://github.com/vueuse/vueuse/issues/1070",0.6906357,{"description":3048,"labels":3049,"number":3050,"owner":3023,"repository":3023,"state":3034,"title":3051,"updated_at":3052,"url":3053,"score":3054},"\r\n \r\nI don't know why this is happening.\r\n\r\nI use vueuse in vue2.6.11 with vue-composition-api\r\n",[],809,"Bug: Error in data(): \"TypeError: vueDemi.getCurrentScope is not a function\"","2021-09-30T02:19:33Z","https://github.com/vueuse/vueuse/issues/809",0.69552237,{"description":3056,"labels":3057,"number":3058,"owner":3023,"repository":3033,"state":3034,"title":3059,"updated_at":3060,"url":3061,"score":3062},"\r\n\r\n\r\nWhen using in Vue 2.6, the hasInjectionContext method will be executed. At this point, the default method exposed by VueCompositionAPI is only install. You need to selectively import getCurrentInstance.",[],231,"Vue 2.6: Error \"VueCompositionAPI.getCurrentInstance is not a function\" in hasInjectionContext()","2023-05-18T10:21:16Z","https://github.com/vueuse/vue-demi/issues/231",0.70106447,{"description":3064,"labels":3065,"number":3066,"owner":3023,"repository":3023,"state":3034,"title":3067,"updated_at":3068,"url":3069,"score":3070},"I've created a project with vite+vue2(using plugin)+vueuse and it looks like vueuse doesn't work properly in this setup.\r\n\r\nThe error I get:\r\n\r\n```\r\nvue.runtime.esm.js:619 [Vue warn]: Error in data(): \"ReferenceError: ref3 is not defined\"\r\n\r\nfound in\r\n\r\n---> \u003CAnonymous>\r\n \u003CRoot>\r\nwarn @ vue.runtime.esm.js:619\r\nvue.runtime.esm.js:1888 ReferenceError: ref3 is not defined\r\n at Object.ref (index.esm.js:1)\r\n at useCounter (index.esm.js:698)\r\n at setup (App.vue:21)\r\n at mergedSetupFn (vue-composition-api.esm.js:1741)\r\n at vue-composition-api.esm.js:1527\r\n at activateCurrentInstance (vue-composition-api.esm.js:1454)\r\n at initSetup (vue-composition-api.esm.js:1525)\r\n at VueComponent.wrappedData (vue-composition-api.esm.js:1509)\r\n at getData (vue.runtime.esm.js:4748)\r\n at initData (vue.runtime.esm.js:4705)\r\n```\r\n\r\nI tried `useCounter` and `useStorage`, but I think it can be replicated with other methods.\r\n\r\nHere is the project link to replicate: \r\nhttps://github.com/localhost5001/vite-vue2-vueuse-template",[],485,"Incompatible with vite and vue2","2021-05-05T20:52:10Z","https://github.com/vueuse/vueuse/issues/485",0.70178795,{"description":3072,"labels":3073,"number":3074,"owner":3023,"repository":3033,"state":3034,"title":3075,"updated_at":3076,"url":3077,"score":3078},"问题1: 一个vue3的组件在vue3环境下打包后的 在vue3的demo中使用组件样式未生效,getCurrentInstance获得的是null\r\n` import {\r\n defineComponent,\r\n ref,\r\n Vue2,\r\n isVue2,\r\n isVue3,\r\n getCurrentInstance,\r\n createVNode,\r\n render\r\n } from 'vue-demi';\r\n // import { createVNode, render } from 'vue'; // 若使用demo环境中的vue样式是生效的\r\n import Card from './card.vue';\r\n\r\n export default defineComponent({\r\n setup(props, context) {\r\n const btnFun = () => {\r\n cardShow();\r\n };\r\n\r\n const cardShow = () => {\r\n const node = document.getElementById('game-card');\r\n if (!node) {\r\n // 在vue2环境没有问题\r\n if (isVue2) {\r\n const gameCardComponent = Vue2.extend(Card);\r\n const gameCardInstance = new gameCardComponent({\r\n propsData: {\r\n btnObj: this\r\n }\r\n }).$mount();\r\n document.body.appendChild(gameCardInstance.$el);\r\n }\r\n if (isVue3) {\r\n const instance = getCurrentInstance();\r\n console.log(instance); // 打印为null\r\n const gameCardComponent = createVNode(Card, {\r\n btnObj: instance\r\n });\r\n render(gameCardComponent, document.querySelector('body'));\r\n }\r\n }\r\n };\r\n\r\n return {\r\n button_name,\r\n btnFun\r\n };\r\n }\r\n });`\r\n\r\n问题2: 一个vue3的组件在vue2环境下使用打包后的 在vue2的demo中\r\n\r\n",[],194,"在'vue-demi'中可以导出createVNode, render, getCurrentInstance这些vue3的方法使用吗?","2022-08-30T02:36:24Z","https://github.com/vueuse/vue-demi/issues/194",0.71231025,{"description":3072,"labels":3080,"number":3081,"owner":3023,"repository":3033,"state":3034,"title":3075,"updated_at":3082,"url":3083,"score":3078},[],195,"2022-08-26T12:48:02Z","https://github.com/vueuse/vue-demi/issues/195",{"description":3085,"labels":3086,"number":3087,"owner":3023,"repository":3023,"state":3034,"title":3088,"updated_at":3089,"url":3090,"score":3091},"### Describe the bug\n\nwhen I use useIntervalFn from @vueuse/core in my vue project,but now, my IDE says \"cannot resolve symbol 'useIntervalFn'\" and it is red as on image below.\r\n\r\nAt the same time,when I check`node_modules`,it looks very strange,and It does not jump to where the function is declared.\r\n\r\n\r\nI tried to reinstall packages, nothing helped. \r\nI use `npm i @vueuse/core` to install it.\r\nApp still compiles without problems.\r\n\r\n\n\n### Reproduction\n\nnull\n\n### System Info\n\n```Shell\nIDE: WebStorm 2022,\r\nOS: Win 10,\r\n\"@vueuse/core\": \"^8.5.0\",\r\n\"vue\": \"^3.2.13\",\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.",[],1650," can not recognized useIntervalFn","2022-07-21T12:02:12Z","https://github.com/vueuse/vueuse/issues/1650",0.7201423,{"description":3093,"labels":3094,"number":3095,"owner":3023,"repository":3023,"state":3034,"title":3096,"updated_at":3097,"url":3098,"score":3099},"### Describe the bug\r\n\r\nAccording to the [documentation](https://vueuse.org/shared/usetoggle/#usage) you can import `useToggle` from `@vueuse/core`, but this does not exist, it is located under `@vueuse/shared`.\r\n\r\n\r\n\r\nBut in all the demos it imports correctly, like under [useDark](https://github.com/vueuse/vueuse/blob/main/packages/core/useDark/demo.vue#L2).\r\n\r\nIn addition, it is also incorrectly referenced in some other parts of the documentation, such as under [useDark](https://vueuse.org/core/useDark/#basic-usage).\r\n\r\nI think that is also meant here in the [issue](https://github.com/vueuse/vueuse/issues/1112).\r\n\r\n### Reproduction\r\n\r\n[Repo](https://github.com/vueuse/vueuse/tree/main/packages/core)\r\n\r\n### System Info\r\n\r\n```Shell\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.",[],1323,"There is no 'useToggle' in '@vueuse/core'","2022-02-27T19:48:29Z","https://github.com/vueuse/vueuse/issues/1323",0.72057164,["Reactive",3101],{},["Set"],["ShallowReactive",3104],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fAJ_2o7NvOMS3dw_N77pVvsKVJPyt9rnA8M2jbFjWZRI":-1},"/vueuse/vue-demi/68"]