\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.73980284,{"description":3122,"labels":3123,"number":3124,"owner":3067,"repository":3068,"state":3094,"title":3125,"updated_at":3126,"url":3127,"score":3128},"## Explanation\r\n\r\nHello there. I have a simple typescript package that uses `vue-demi`\r\n\r\n```ts\r\n// src/index.ts\r\nimport { ref } from 'vue-demi'\r\n\r\nexport function useTestPackage () {\r\n const hello = ref('Hello World')\r\n\r\n return {\r\n hello\r\n }\r\n}\r\n```\r\nAnd my `pacakge.json`\r\n```json\r\n{\r\n \"name\": \"test-ts-package\",\r\n \"version\": \"0.0.1\",\r\n \"main\": \"dist/cjs/index.js\",\r\n \"module\": \"dist/esm/index.js\",\r\n \"types\": \"dist/esm/index.d.ts\",\r\n \"description\": \"\",\r\n \"scripts\": {\r\n \"build\": \"npx rimraf dist && npm run build:esm && npm run build:cjs\",\r\n \"build:esm\": \"tsc --module es2015 --outDir dist/esm -d\",\r\n \"build:cjs\": \"tsc --module commonjs --outDir dist/cjs\",\r\n \"serve\": \"npm run build && npm pack\"\r\n },\r\n \"author\": \"\",\r\n \"license\": \"ISC\",\r\n \"dependencies\": {\r\n \"vue-demi\": \"latest\"\r\n },\r\n \"devDependencies\": {\r\n \"@vue/composition-api\": \"^1.0.0-rc.1\",\r\n \"typescript\": \"^4.4.2\",\r\n \"vue\": \"^3.0.0\"\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\n\r\nI run `npm run serve` to build the project and pack it on a `.tgz` file for local installation\r\n\r\n## Vue 3 Usage\r\nIn my Vue 3 App (Vite) I installed with local path `npm i ../test-ts-package/test-ts-package-0.0.1.tgz`\r\n\r\nAnd in my page I have this\r\n```vue\r\n\u003Ctemplate>\r\n \u003Cdiv>\r\n \u003Ch6>\r\n {{ hello }}\r\n \u003Cbutton @click=\"handleClick\">click\u003C/button>\r\n \u003C/h6>\r\n \u003C/div>\r\n\u003C/template>\r\n\r\n\u003Cscript lang=\"ts\">\r\nimport { defineComponent } from 'vue'\r\n\r\n// i18nManager\r\nimport { useTestPackage } from 'test-ts-package'\r\n\r\nexport default defineComponent({\r\n name: 'PageIndex',\r\n setup () {\r\n const { hello } = useTestPackage()\r\n\r\n const handleClick = () => {\r\n console.log(hello.value)\r\n hello.value = 'lalal'\r\n console.log(hello.value)\r\n }\r\n\r\n return {\r\n hello,\r\n handleClick\r\n }\r\n }\r\n})\r\n\u003C/script>\r\n```\r\nAnd everything works as expected, Prints `Hello World` and when I click the button it changes to `lalal`\r\n\r\n## Problem\r\nSame thing in a Vue 2 + Composition API (Quasar) App\r\n\r\n```vue\r\n\u003Ctemplate>\r\n \u003Cq-page class=\"row items-center justify-evenly\">\r\n \u003Ch6 class=\"text-xl text-center text-gray-800\">\r\n {{ hello }}\r\n \u003Cbutton @click=\"handleClick\">click\u003C/button>\r\n \u003C/h6>\r\n \u003C/q-page>\r\n\u003C/template>\r\n\r\n\u003Cscript lang=\"ts\">\r\nimport { defineComponent } from '@vue/composition-api'\r\n\r\n// i18nManager\r\nimport { useTestPackage } from 'test-ts-package'\r\n\r\nexport default defineComponent({\r\n name: 'PageIndex',\r\n setup () {\r\n const { hello } = useTestPackage()\r\n\r\n const handleClick = () => {\r\n console.log(hello.value)\r\n hello.value = 'lalal'\r\n console.log(hello.value)\r\n }\r\n\r\n return {\r\n hello,\r\n handleClick\r\n }\r\n }\r\n})\r\n\u003C/script>\r\n```\r\n\r\nPrints `hello world` and on button click I get the correct value in the console but not in the DOM and also if I import my package then all the reactive values stop working properly!",[],102,"Reactivity issue with Vue 2 but not Vue 3","2022-01-12T08:53:55Z","https://github.com/vueuse/vue-demi/issues/102",0.74209094,{"description":3130,"labels":3131,"number":3132,"owner":3067,"repository":3067,"state":3094,"title":3133,"updated_at":3134,"url":3135,"score":3136},"Because some functions are imported from `vue` instead of `vue/demi`, latest release is broken with vue 2.\r\n\r\nhttps://github.com/vueuse/vueuse/compare/v6.2.1...v6.3.1 \r\n\r\nhttps://github.com/vueuse/vueuse/blob/d0fa468799fd9637dac86d9c695ccff2d220d9e7/packages/core/useDraggable/index.ts#L1",[],729,"v6.3.x is broken with vue2","2021-09-08T19:53:21Z","https://github.com/vueuse/vueuse/issues/729",0.742641,{"description":3138,"labels":3139,"number":3140,"owner":3067,"repository":3067,"state":3094,"title":3141,"updated_at":3142,"url":3143,"score":3144},"### Describe the bug\r\n\r\nI recently updated vueUse to the latest version and noticed the `tryOnMounted` hook was added inside couple of the composables. The issue that I have is that when I try to change my route hash (which triggers an 'beforeUpdate` and `updated` lifecycle hook, it's getting into the method and intervening with my logic. \r\n\r\nfor example. inside `useScroll`, it's not updating my y.value. (unless I wrap it within a setTimeout). [waiting after `tryOnMounted` to be executed]\r\n\r\n\u003Cimg width=\"781\" alt=\"Screenshot 2024-01-15 at 4 01 02 PM\" src=\"https://github.com/vueuse/vueuse/assets/37899422/2246699d-4dad-4fce-b655-51a7d05e8b7c\">\r\n\r\n\r\n\r\n\r\ninside `useElementSize` its setting the width and height again, which is triggering a watcher I have inside the component on every route hash change. \r\n\r\nI would suggest passing an option to the composables to disable the `tryOnMounted` hook. or reconsider using it all together within some of the composables. \r\n\r\n### Reproduction\r\n\r\nhttps://github.com/vueuse/vueuse/blob/main/packages/shared/tryOnMounted/index.ts\r\n\r\n### System Info\r\n\r\n```Shell\r\nSystem:\r\n OS: macOS 14.2.1\r\n CPU: (10) x64 Apple M1 Pro\r\n Memory: 28.47 MB / 16.00 GB\r\n Shell: 3.2.57 - /bin/bash\r\n Binaries:\r\n Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node\r\n npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm\r\n Browsers:\r\n Brave Browser: 105.1.43.93\r\n Chrome: 120.0.6099.216\r\n Chrome Canary: 122.0.6249.1\r\n Firefox: 114.0.2\r\n Safari: 17.2.1\r\n npmPackages:\r\n @vueuse/components: ^10.7.1 => 10.7.1 \r\n @vueuse/core: ^10.7.1 => 10.7.1 \r\n vue: ^3.4.7 => 3.4.7 \r\n\r\nnpm notice \r\nnpm notice New major version of npm available! 9.5.1 -> 10.3.0\r\nnpm notice Changelog: https://github.com/npm/cli/releases/tag/v10.3.0\r\nnpm notice Run npm install -g npm@10.3.0 to update!\r\nnpm notice\r\n```\r\n\r\n\r\n### Used Package Manager\r\n\r\npnpm\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.",[],3723,"the usage of tryOnMounted inside the composables is causing issues.","2025-05-29T19:34:13Z","https://github.com/vueuse/vueuse/issues/3723",0.7473414,["Reactive",3146],{},["Set"],["ShallowReactive",3149],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fhx57Pd43vP1LYW9AOUwogn8VHNH0ZZrBQ-5yd2gbO9g":-1},"/vueuse/vue-demi/50"]