I have trouble importing Firebase into my React project. I got to the part where I want to display the data in the order I push it into the database. My way is using timestamps.
await addDoc(todosRef, {text: input, timestamp: firebase.database.ServerValue.TIMESTAMP});
For this to work I need to import firebase into my App.js, but this below is not working.
import firebase from 'firebase/app'
The app spits out this error message:
export 'default' (imported as 'firebase') was not found in 'firebase/app' (possible exports: FirebaseError, SDK_VERSION, _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel)