Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

315
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda