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

233
Visualizações
How can I send data from a child component to a child component without using props?

Is this possible And how to do this. I worked on a similar thing in vuejs like

this.$emit("send",payload)

and then listen in another component

this.$on("send",(payload) => {
/and do something the in another component
}

How to Do this in ReactJS

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

you can use a react context https://reactjs.org/docs/context.html or redux https://redux.js.org/

about 4 years ago · Juan Pablo Isaza Relatório

0

What you want is called event bus in vue.js, but it is an anti-pattern so it was removed from the API in vue 3.

However if you really liked that approach, you can probably achieve it with an external library that implements the event emitter interface.

You can read more about it here with provided example: https://v3-migration.vuejs.org/breaking-changes/events-api.html#event-bus

about 4 years ago · Juan Pablo Isaza 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