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

326
Visualizações
What's the best/recommended way to pass reactive props from components to composables in Vue 3 Composition API?

I'm currently trying out Vue 3's Composition API, using a main app and several composition funtions, aka 'composables'. I studied official docs and several tuts. It seems there are many ways of accomplish the same tasks, so I was wandering what is the best for a couple of things:

  • how to pass reactive variables from the main app to the composables? I mean: should I just pass them as the composable's parameters or should I do it some othe way?

  • how to use other app's methods or other composables from a composable? :)

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

  1. You could pass any raw/reactive data as composable parameter, but make sure to make the composable function more independent from the component logic (to make it more reusable), you could check Vuetify 3 composable functions and vueuse to get inspired.

  2. Pass them as parameters then run them when needed inside the composable logic.

over 4 years ago · Santiago Trujillo Relatório
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