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

150
Visualizações
How to use the Firebase objects in different files?

This might be a stupid question but I am learning all of this by myself and I didn't find anything about it in the documentation.

I am currently building a Vue app and using Firebase as my backend. In order to use the Firebase services, you create an app object with the initializeApp() method and then access services like the database by calling getDatabase(app) and working with the returned object. Now my question is: If I do these things inside my top level component (App), but then need to access the database inside another component, can I just call the getDatabase() method again, or do I have to somehow export the first object so that I can access it from other files?

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

0

The Firebase SDKs are pretty good at re-using objects behind the scenes, so you can typically call initializeApp once and then call getDatabase in each component.

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