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

314
Vistas
Vue3 - watching changes on all variables in component at once instead of each one?

I have a few variables in my component. For example:

const selectedStudents = computed({
get: get it
set: { set it; search(); }

const selectedTeachers = computed({
get: get it
set: { set it; search(); }


const selectedSchools = computed({
get: get it
set: { set it; search(); }

I am wondering if it's possible to make it so that instead of having the search(); in every set function, I somehow watch changes on ANY of the variables, and if any of them changes, I perform a search. The reason I want this is because currently, in certain situations, I perform as many searches as I have variables (7-8 currently), when it could just be one search instead.

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