Firebase
: Firebase for authentication , real time database and deployment.
React.js
: Javascript library for frontend.
HTML & CSS
: for styling react components.
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
const provider = new firebase.auth.GoogleAuthProvider();
auth.signInWithPopup(provider);
};
const { uid, photoURL } = auth.currentUser; //get current user
//add messages to firestore collection "messages"
await messagesRef.add({
text: formValue,
createdAt: firebase.firestore.FieldValue.serverTimestamp(),
uid,
photoURL,
});
};