Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [vuejs3]

Use this tag for questions specific to version 3 of Vue.js, an open-source, progressive Javascript framework for building user interfaces.

65 votes
5 answers
118k views

Vue 3 Composition API - How to get the component element ($el) on which the component is mounted?

I want to use onMounted to initiate a third-party library. To do that I need the component element as its context. In Vue 2 I would get it with this.$el but not sure how to do it with composition ...
Damir Miladinov's user avatar
0 votes
0 answers
70 views

Changing a hard-coded prop on an imported component doesn't trigger HMR

I've been playing around with vue-next (version 3 of vuejs) and ran into an issue with HMR. Here's a rundown of my environment and the problem but: TL;DR; - Hard coded props don't trigger HMR on an ...
onx2's user avatar
  • 96
3 votes
1 answer
791 views

How to apply CSS to the root of a Vue 3 component?

I am moving Vue 2 source over to Vue 3 (beta), and came across this: <template> <section id="this"> <!-- how to eliminate this? --> <div> YOU ARE AT HOME 🏯 &...
akauppi's user avatar
  • 17.8k
10 votes
4 answers
9k views

Why dynamic component is not working in vue3?

Here is a working Vue2 example: <template> <div> <h1>O_o</h1> <component :is="name"/> <button @click="onClick">Click me !</button>...
progervova's user avatar
2 votes
1 answer
1k views

Vue3 - Composition Function vs. import { functionObject } from 'module'

So I just read through the new Composition API RFC (link). Here they compare multiple methods to reuse code across components. Therein the import from module method is not included. I guess that's ...
Sev M's user avatar
  • 38
253 votes
8 answers
129k views

ref vs reactive in Vue 3?

Looking at some examples of some people's preview tutorials for Vue 3. [Currently beta right now] I've found two examples: Reactive <template> <button @click="increment"> ...
Denis Tsoi's user avatar
  • 10.1k
0 votes
1 answer
331 views

vuejs Datable is not working with api's fetched data

I want to display the data in table using vue-datatable but it is not working. Here is the code that i am using ,i am getting data in json format but it is not appending with datatable can anyone help ...
HaryanviDeveloper's user avatar
1 vote
1 answer
1k views

v-model updated in code but not on screen using Vuetify.js

I have a problem: I have 4 fields in a data object: contact_id, contact_child_id, address_id, address. When contact_id OR contact_child_id OR address_id are changed, the address is updated. ...
Patrice Flao's user avatar
0 votes
1 answer
39 views

Vue Typecript: declaring data with type

How can I achieve the following similar in Vue with Typescript? DocumentReference docRef = null export default Vue.extend({ ... ... data: function(){ return { docRef: ...
ronbm's user avatar
  • 187
6 votes
1 answer
12k views

Vue 3 recommended TypeScript TSConfig compilerOptions TARGET setting?

This question has puzzled me at several points when using Vue 2 and Vue CLI, and now again with starting a fresh Vue 3.0 beta project. Even with the currently newest Vue CLI version 4.3.1, when ...
ux.engineer's user avatar
1 vote
1 answer
3k views

How do you set up Vue 3 main.js file with extra imports?

Hi I'm trying to do the vue 3 version of main.js file that works in vue 2 vue 2 import Vue from "vue"; import App from "./App.vue"; import store from "./store"; import Amplify, * as AmplifyModules ...
Jordan's user avatar
  • 411
9 votes
1 answer
3k views

Vue 3 what is the class-Based API, function-based API, Reactivity API and composition API

When I started working with vue 3, I saw these notions : Object-based API Function-based API Class-Based API Composition API Options API Reactivity API Can some one tell us the definitions of these? ...
karlos's user avatar
  • 940
0 votes
2 answers
894 views

Vue.js 3 optional v-scroll-to

Here is the code that I use. <template> <div class="button-layout" :style="`margin: ${margin}; text-align: ${align};`"> <component :is="buttonComponent" v-for="(...
Jonathan Gagne's user avatar
35 votes
10 answers
36k views

How to properly reset Vue Composition Api's reactive values

I'm wondering how should I reset a reactive in vuejs setup? (i know if change it to the ref and using view.value will solve this problem, but there should be an answer to this for using reactive) ...
SeyyedKhandon's user avatar
20 votes
1 answer
21k views

How to access dynamic ref-tagged html elements in Vue.js 3?

Using the Vue.js 2 api-composition, you have a .ref attribute on the setupContext argument of setup(). As stated in many articles and in this thread : https://github.com/vuejs/composition-api/issues/...
hl037_'s user avatar
  • 3,849

15 30 50 per page