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

76
Vistas
Vue 3 change reactive object

I have some struggles changing reactive object in Vue 3. For now my app works like that:

 let selected = ref({
            label: items[0].label,
            icon: items[0].icon,
            class: items[0].class,
            component: items[0].component
        });

as you see I'm not using reactive here, reactive should look like: let selected = reactive(items[0]);

and when I'm changing ref, it works like that:

function select(value : any) { //Record<string, any> ) {
      selected.value = value;

      emit('update:modelValue', value);
    }

And that works as expected, but when I change to reactive object, I'm removing value from function select, and it's not changing the object. How to fix that?

btw: I'm using TypeScript

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