I apologize for my ignorance, but as I am teaching myself, I have not been able to find the answer in the available documentation.
My current project involves developing a Vue application with Firebase as the backend. To utilize Firebase services, you must create an app
object using the initializeApp()
method and then access services such as the database by invoking getDatabase(app)
and working with the returned object. My question is this: if I perform these actions within my top-level component (App), but later need to access the database from another component, can I simply call the getDatabase()
method again, or do I need to somehow export the initial object in order to access it from other files?