That is not working in v. 9.0.1. So to make it work, use this:
On the first step, do
import { initializeApp } from 'firebase/app'; - instead of importing just 'firebase' as a default import
And to check is the app initialized, do
import { getApps } from 'firebase/app'; - instead of importing just 'firebase' const firebaseApp = getApps()[0]; - instead of firebase.apps[0]
The rest remain the same.
Thank you! The API has changed a lot with the new release. Planning on making an update soon.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That is not working in v. 9.0.1. So to make it work, use this:
On the first step, do
import { initializeApp } from 'firebase/app'; - instead of importing just 'firebase' as a default import
And to check is the app initialized, do
import { getApps } from 'firebase/app'; - instead of importing just 'firebase'
const firebaseApp = getApps()[0]; - instead of firebase.apps[0]
The rest remain the same.
Thank you! The API has changed a lot with the new release. Planning on making an update soon.