Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!