DEV Community

Discussion on: How to omit `.value` in refs (Vue 3 Composition API)

Collapse
 
mreduar profile image
Eduar Bastidas • Edited

How cool, I didn't know this. Is there anything against using $ref() instead of ref()?

Edit:
I found a problem and it is that the editor says that there is an error because it is trying to modify a constant.

const isReading = ref(true);
isReading = false; //<- Error, is constant.
Enter fullscreen mode Exit fullscreen mode