react-firebase-chat
react-firebase-chat copied to clipboard
No databaseURL in the SDK snippet
I was watching the video and working along. But my firebase app does not have the 'databaseURL' in the SDK snippet but it has an extra 'measurementID'.
I think you have to re-generate the SDK config by deleting the existing app and creating a new web app.
This will works because you have generated the SDK config before enabling Firestore.
By default, when you add the app it will not provide a databaseUrl which ends with firebaseio.com.
The issue #4221 created here responds to this very stuff.
If you want to follow the video verbatim, you need to go to the Dashboard and click Realtime Database and enable it. This will provide you with a databaseUrl.
Now, the app really does not make any use of the Realtime Database as Cloud Firestore is just capable enough to handle the stuff.. You can modify the config to remove the key databaseUrl:
const config = {
apiKey: "*********",
authDomain: "********",
projectId: "*********",
storageBucket: "********",
messagingSenderId: "*******",
appId: "*********",
measurementId: "G-********"
};
Now coming to measurementId, yeah Google now lets developers to collect analytics (optional) by integrating it with Google Analytics.
This is an optional but very powerful feature, and to have more insight watch the Video on Youtube made by Fireship.
Hope it helps..