Skip to main content

All Questions

4 votes
1 answer
3k views

Is there any problem if I use two onMounted() per one component?

I have only seen examples of one onMounted() per one component. I'd like to use onMounted() for each feature. Is there any problem? MyComponent.vue <script setup> import { onMounted } from 'vue';...
decoy's user avatar
  • 171
0 votes
2 answers
2k views

Vue 3 composition API pass array props through many children

I need to pass an array from component A (App.vue) through component B to component C. What I do is this (this first step works, just read it to understand): // A.vue <script setup> import B ...
grimoiredark's user avatar
1 vote
1 answer
486 views

How to access SFC data properties from the parent not using $refs in Vue v3?

I have this Vue 3 SFC <template> <div> Home component </div> </template> <script> export default { name: 'Home', icon: 'house-icon' } </script&...
Tolbxela's user avatar
  • 5,211
0 votes
1 answer
908 views

Vue 3 - Component is not loaded or rendering

I have following component: <script setup> import {defineProps, ref, watch} from "vue"; import ProductsComponent from '@/components/Products.vue' import OrdersComponent from '@/...
Sasha's user avatar
  • 8,725
0 votes
2 answers
112 views

a small vue issue about set value to object.value

<template> <button @click="random(randomNum)">Click to plus {{count}}</button> </template> <script setup> import { ref } from "vue" const count = ...
Leon's user avatar
  • 307
2 votes
1 answer
1k views

Vue3 dynamic render

I have a list of components and I want to set a config for them from outside, For example: const myConfig = [ { name: 'example', renderer: () => (<button @click="clickHanlder&...
mh f's user avatar
  • 63
6 votes
2 answers
7k views

Watch child properties from parent component in vue 3

I'm wondering how I can observe child properties from the parent component in Vue 3 using the composition api (I'm working with the experimental script setup). <template>//Child.vue <button ...
wittgenstein's user avatar
  • 4,530