Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

324
Vistas
mounted is being shared across instances of a component Vue.js

I have multiple instances of a component being rendered, not at the same time, if you open up a different container, another instance gets rendered. The first instance rendered gets the mounted() triggered but all the other instances don't and they share the same results of that mounted call. How do I separate them? I tried doing "@Watch('prop')" but the first instance of the component doesn't get that method called, since prop hasn't changed.

@Prop() assignee!: Person;

accountName = '';

data(): any {
return {
accountName: '',
}
}

async mounted(): Promise<void> {
this.accountName = ...;
}

so accountName is the same for different instances of the component, since the mounted call didn't get triggered.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda