I built a chat app in 7 minutes with React & Firebase
Why Stack Overflow recommends it
Stack Overflow users link it as a quick example of Firebase authentication and Firestore chat, and many questions come from people following along who hit errors, partly because the video's code has aged.
Recommended by 3 people across 3 different months, 2021 to 2023.
What it is
A fast-paced Fireship tutorial that builds a complete chat app with React and Firebase in about seven minutes. It covers Google sign-in, Firestore for storing messages, and real-time updates, with the source code published on GitHub.
What people said
Recommends Jacob K · 2021-04 · Stack Overflow · on “Where should I implement firebase authentication?”
It is generally better practice to host authentication (and especially authentication logic) in the back-end, if not for performance, definitely for security reasons. That said, you can avoid using cloud functions for this authentication with firebase! Here is an alternative super simple video tutorial you may like instead from Fireship: [this video] . The Google Firebase YouTube channel [LINK] also has many videos on the subject. Cloud functions are useful for when you want parallel action to be taken in the back-end during or after login, while the useAuthState() [LINK] react hook is great for when you want parallel action to be taken in the front-end during or after login.
Recommends nopmon hatman · 2021-07 · Stack Overflow · on “Unhandled Rejection (FirebaseError): Function addDoc() called with invalid data. Unsupported field value: undefined”
I decided to create a firebase messaging app based off of the video: [this video] And so far I can get the ui up, just when I type in a message and hit the enter button it displays: [LINK] And I think it has something to do with one of the fields not returning a value, but I don't know what fields aren't returning a value. Probably something to do with the message idk. I have put previously: firestore.settings({ ignoreUndefinedProperties: true }); into there and it doesn't crash when I do that, but then I can't send a message. Here is my App.Js code (note: I haven't done javascript previously) import React, { useRef, useState } from 'react'; import './App.css'; import firebase from 'firebase/app'
Recommends Manas Gupta · 2022-10 · Stack Overflow · on “React Hook "useAuthState" cannot be called at the top level. React Hooks must be called in a React function component or a custom React Hook function”
I am writing a code watching this video from Fireship.io ( [this video] ) to build a chatapp using Firestore and using Google Auth in Firebase. I am getting the following error. I know that the video is a bit outdated so please help me out with this one!! Error Message: [eslint] src\App.js Line 26:16: React Hook "useAuthState" cannot be called at the top level. React Hooks must be called in a React function component or a custom React Hook function react-hooks/rules-of-hooks Error is based on usage of Firebase in Node JS due to version compatibility issues. Full Code: import React from 'react' import './App.css'; import firebase from 'firebase/compat/app'; import 'firebase/compat/auth'; import 'f
Cites Audio Tone · 2022-05 · Stack Overflow · on “How do I display my react App.Js in the HTMl file?”
How can I display my App.Js react app file in my Index.html file?" <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="theme-color" content="#000000" /> <meta name="description" content="Web site created using create-react-app" /> <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> <!-- <link rel="stylesheet" href=" [LINK] " integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> --> <!-- manifest.json provides metadata used when your web app is installed on a user's mobile device o
Cites Adam Princiotta · 2023-01 · Stack Overflow · on “Firebase query undefined when using react-firebase-hooks”
I was following Fireship's building chat app video [this video] (this part is around 3:30-4 minutes) but I am trying do something different, just using it for oauth and database setup help. I made a simple database on it, then tried to follow the query format where the collection grab and query seem to work fine since I can console.log them. But when I try to use the collection data, it is undefined. I also found another post on here similar that queried it differently and tried to use an grab a specific variable, but doing that just left me with an error saying "query2 is not a function". So below I added 2 versions of what I tested. ListItem is the collection name, and checked is one of my vari
Cites Erez Ben-Zvi · 2023-12 · Stack Overflow · on “not knowing how to open a react & firebase website that I created”
So I just made a website following this toturial [this video] I followed it and I have the code one to one but when I looked at the firebase page of mine it doesn't tell me what is the URL of the website that I created so know I am stuck with a website not knowing how to run it or open it PS. if I need to run some sort of script that I made from the toturial please tell me because I have no Idea