vue unref error
See original GitHub issue⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.
- Read the docs.
- Use Vite >=2.0. (1.x is no longer supported)
- If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.
Describe the bug
@yyx990803 I think there will be many such problems in this update
<script lang="ts">
import { defineComponent, ref, unref } from 'vue';
export default defineComponent({
name: 'App',
setup() {
const count = ref(0);
console.log(unref(count));
return {};
},
});
</script>
Reproduction
git clone https://github.com/anncwb/vite-bug yarn && yarn serve
System Info
vite
version:beta.41- Operating System:
- Node version:
- Package manager (npm/yarn/pnpm) and version:
Logs (Optional if provided reproduction)
- Run
vite
orvite build
with the--debug
flag. - Provide the error log here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:20 (7 by maintainers)
Top Results From Across the Web
"ReferenceError: _unref is not defined" - Stack Overflow
I'm creating a website (still a work in progress), which is currently hosted on Netlify at the following link: ChillingConCarne.
Read more >Reactivity API: Core - Vue.js
ref() #. Takes an inner value and returns a reactive and mutable ref object, which has a single property .value that points to...
Read more >[RANT] How Vue 3 drove me away : r/vuejs - Reddit
The problem Vuex solved for Vue 2 is solved by the composition API. ... Magic behaviors like unref-ing automatically at the template level...
Read more >Juggling Vue.js Refs - Abdelrahman's Blog
Luckily Vue exports an unref function that makes this a breeze. ... But that's the problem, for the reactive value to be passed...
Read more >Guidelines | VueUse
Here are the guidelines for VueUse functions. ... data = shallowRef<T | undefined>() const error = shallowRef<Error | undefined>() fetch(unref(url)) .then(r ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think it should be fixed by 4c4d629.
@ResuBaka
@vue/server-renderer
should be moved todevDependencies
or excluded for optimization.@yyx990803 I have updated github. You can pull again. It’s amazing that I’ve tried a lot of this error. The error will only appear when the following dependencies are included. Delete one of them and the error will disappear. I don’t know if this error is vite fault