How To Set Up React With Firebase/Firestore | Get & Realtime | Part 1

  Рет қаралды 65,149

Sam Fromaway

Sam Fromaway

Күн бұрын

Пікірлер: 80
@SamFromaway
@SamFromaway 2 жыл бұрын
NEW VIDEO Version 9: kzbin.info/www/bejne/Y6rVn4qkg5Wab9E 👈
@opus1magnum
@opus1magnum 2 жыл бұрын
Thanks for video! Btw, whoever got an error after trying to import from 'firebase/app' - just letting you know that imports now (from v9 of firebase) must be made from 'firebase/compat/app'. Like this - import firebase from 'firebase/compat/app';
@loxx8782
@loxx8782 2 жыл бұрын
Maan i love you, I've been thinking what's wrong for almost and hour..
@opus1magnum
@opus1magnum 2 жыл бұрын
@@loxx8782 happy this saved your time! :)
@trevorallen7554
@trevorallen7554 3 жыл бұрын
Thank you Thank you! This is by far the easiest and simplest React-Firebase tutorial on KZbin. Perfect!
@yusufdimari3512
@yusufdimari3512 3 жыл бұрын
This is the simplest tutorial ive seen and the best as well. Thank you very much.
@sohamjain7803
@sohamjain7803 2 жыл бұрын
thank you so much, its a bit out of date with v9 requiring slightly different imports but the way you walked through how to do everything was so easy to understand.
@muhammadosama4593
@muhammadosama4593 3 жыл бұрын
I was facing some error when I connected firebase with my react app. But after thi video I have solved the problem. Thank You and God bless you
@mahedikamal8472
@mahedikamal8472 4 жыл бұрын
thanks , it helped me to add firebase 1 day before my project submission .
@mbogomahad3125
@mbogomahad3125 3 жыл бұрын
💯
@AkashSatre
@AkashSatre 2 жыл бұрын
Thanks bro your video helped me Alot in a task where I was stuck from too long
@hassaneloufir8440
@hassaneloufir8440 4 жыл бұрын
thank you sooooooooo much this is what I was looking for. this video deserves more likes :3
@pjguitar15
@pjguitar15 3 жыл бұрын
This tutorial is so simple and short, I like it
@dattubhargavmedarametla576
@dattubhargavmedarametla576 3 жыл бұрын
You deserve a like and comment dude. Thanks for the video
@SamFromaway
@SamFromaway 3 жыл бұрын
I appreciate that :D
@kalpeshpatil741
@kalpeshpatil741 3 жыл бұрын
this is the content i am looking for
@laurentgenereux4159
@laurentgenereux4159 3 жыл бұрын
Omg !!! Thank you !!! I'm struggleling for a looooooooong time with this !
@allansaleh6267
@allansaleh6267 4 жыл бұрын
Awesome tutorial! Well explained! You deserve more subscribers!
@santacroce2489
@santacroce2489 3 жыл бұрын
you saved my life . perfect tutorial
@dbsjaks_56888
@dbsjaks_56888 2 жыл бұрын
what i was looking for! thanks
@stelladare5741
@stelladare5741 2 жыл бұрын
This turtorial was really helpful and straignt to the point. Thanks a lot.
@estebanmunchjones7946
@estebanmunchjones7946 3 жыл бұрын
thanks bro! I was struggling adding the SDK and initialising Firebase
@antoniobraccio5210
@antoniobraccio5210 3 жыл бұрын
i have this problem : index.js:1 [2021-03-21T13:25:22.609Z] @firebase/firestore: Firestore (8.3.1): Could not reach Cloud Firestore backend. Connection failed 1 times.
@ade-joshe
@ade-joshe 3 жыл бұрын
Thanks... It was quite easy to follow and understand
@chiranjeevichowdary5948
@chiranjeevichowdary5948 3 жыл бұрын
Very nice video.U r helping us a lot!!
@jaggyjut
@jaggyjut 3 жыл бұрын
what if we also want to upload the picture of the school in firebase storage and also be able to perform CRUD operations on the image.
@pauljohny200
@pauljohny200 4 жыл бұрын
I needed to understand this. .You have put the right video in right time .Thanks The other good news is you have put the code in github
@SamFromaway
@SamFromaway 4 жыл бұрын
Glad you liked it 😁
@pauljohny200
@pauljohny200 4 жыл бұрын
@@SamFromaway Yes it is super.. Thanks again..alsoo thanks for part 2.
@Yosk-p8j
@Yosk-p8j 4 жыл бұрын
Wow amazing. Well done. Thank you
@mahanmashoof1989
@mahanmashoof1989 3 жыл бұрын
Thanks for this nice tutorial! Firebase v9 should import like firebase/compat/your_package instaed of just firebase/your_pacakge
@ChrisSteurer
@ChrisSteurer 2 жыл бұрын
Thank youuuuu!!
@wildrap9804
@wildrap9804 4 жыл бұрын
There are many errors in the setup: 1. If statement before the use effect 2. Expected an assignment or function call and instead saw an expression 3. Firebase does not work 4. getMember Data does not work either...
@bharatigogoi2779
@bharatigogoi2779 3 жыл бұрын
Thank You So much!!! I've been looking for this since a long time. You really saved me!! Thank You :D
@brittosmonteiro
@brittosmonteiro 3 жыл бұрын
This helped me a lot! Thank you!
@tronganhnguyenthanh1157
@tronganhnguyenthanh1157 3 жыл бұрын
Do we have any ways to add another field directly in database that we create ?
@arsenemn
@arsenemn 4 жыл бұрын
Thanks a lot u really helped me🙏
@svorskemattias
@svorskemattias 3 жыл бұрын
How does putting the keys in an env-file protect them? The keys are still being loaded into the browser aren't they?
@SamFromaway
@SamFromaway 3 жыл бұрын
You are correct, it's just one of many things to protect the database. The .env is primarily a good practice, because sometimes there are server side keys that are not exposed. How to protect the database when you have client side keys is with security rules. More about that here: kzbin.info/www/bejne/noKskKpqdr9saKs
@showbikshowmma3520
@showbikshowmma3520 3 жыл бұрын
one big question how did u change all those stuff in one click 11:31 how did u changed all app keys to for example apiKey: process.env.REACT_APP_API_KEY, how!!?
@finne.7726
@finne.7726 3 жыл бұрын
He created the file before
@showbikshowmma3520
@showbikshowmma3520 3 жыл бұрын
@@finne.7726 how and also how can i do that
@TheNamesJT
@TheNamesJT 3 жыл бұрын
So what does someone do if they already coded a rest api locally with express and using fake data as a json file in my project. I'm wanting to host my backend on firebase the api and database would this series be right for me?
@sushantkamble736
@sushantkamble736 3 жыл бұрын
Thanks! very helpful
@michaelantoniobutler3846
@michaelantoniobutler3846 2 жыл бұрын
Is the .env file required?
@xplore2000
@xplore2000 3 жыл бұрын
Hello there sir I really like the way you are explaining to us I don't know if you know Shaun for the net ninja channel? You're nice in explanation like Shaun man. Thanks for making me understand how to work with react hooks and firebase ✌🏿✌🏿
@SamFromaway
@SamFromaway 3 жыл бұрын
Thanks that's a real compliment :D
@xplore2000
@xplore2000 3 жыл бұрын
@@SamFromaway I got some issues while running my website thesame procedures you did I also did but I just get an error
@timzeynalov3537
@timzeynalov3537 3 жыл бұрын
I cant understnund but why do we need to use setLoading true and false when we try to take data from document and use it ?
@SamFromaway
@SamFromaway 3 жыл бұрын
Because first we are setting loading to true, so the loading text shows, then we start the asynchronous action to try getting the date, once we habe the data we set loading to false so the loading text dissapears.
@probro8747
@probro8747 2 жыл бұрын
thank you soo much!
@kennygunderman
@kennygunderman 3 жыл бұрын
Thank you!
@evernolasco19
@evernolasco19 3 жыл бұрын
Thank you so much!!!! This is exactly what I was looking for!!! How can I upload to the database from react using a state
@lardosian
@lardosian 4 жыл бұрын
So I assume the realtime function is using graphq, subscriptions and websockets in the background to update in realtime. Personally I'm using aws amplify framework and DataStore to do similar. DataStore is an offline first approach where the user interacts with a local browser indexdb which syncs with the cloud dynamodb.
@rgb2647
@rgb2647 2 жыл бұрын
yes no one can tell you what happens when you refresh de page 200 times, how to handle unsubscribe etc.
@p0mf47
@p0mf47 3 жыл бұрын
what version firebase is this
@binaystha1813
@binaystha1813 4 жыл бұрын
Great video!!!!
@mbogomahad3125
@mbogomahad3125 3 жыл бұрын
it helped for real.
@maiaklimenko6614
@maiaklimenko6614 3 жыл бұрын
The setup looks so easy, but, no matter what I do, it always returns empty data. The collection has items and the names are correct, but data is never there :(
@eduardoayora2327
@eduardoayora2327 4 жыл бұрын
Gracias, muy buen video
@SamFromaway
@SamFromaway 4 жыл бұрын
Gracias
@maratfaizer
@maratfaizer 3 жыл бұрын
awesome !
@INFLUENCERPOINTSS
@INFLUENCERPOINTSS 3 жыл бұрын
cant find firebase js in my files
@mrdeangray
@mrdeangray 4 жыл бұрын
Thank you, thank you, thank you!!!!
@perynal
@perynal 3 жыл бұрын
So what if each school had a collection named 'students'. Each with their name and favorite subject. How would you display that?
@SamFromaway
@SamFromaway 3 жыл бұрын
You probably mean how to structure the database for that? Then you have a so called one (school) to many (students) relationship. As with Firebase you are not able to really do "relationships" with your different collections, you have those options. 1. Put a student's set (array) in each school document itself. If for some reason you want it in a separate collection you'll do: 2 a). Reference a id-set (array) in each school document. 2 b). You reference the school in each student document itself. With 2 and 3 you just need to make sure to keep the id-set in schools and the students collection in sync as Firebase won't take care of that like a relational database.
@chanmyaemaung
@chanmyaemaung 4 жыл бұрын
Why you're not using Realtime database instead of using firestore?
@SamFromaway
@SamFromaway 4 жыл бұрын
It has some more features than the real time database and nowadays should be the default choice unless you need a specific feature that only the real time database has.
@chanmyaemaung
@chanmyaemaung 4 жыл бұрын
@@SamFromaway Thank you for your explanation.
@chanmyaemaung
@chanmyaemaung 4 жыл бұрын
@@SamFromaway How do I have to retrieve the single objects data without looping through and put it to the useState hook, that I have stored only one single objects in the firestore? I have subscribed your Channel because I love your teaching style and it is quite a bit easy to understand for me.
@sealovingsoura3036
@sealovingsoura3036 3 жыл бұрын
My data is not coming ,but I am getting no error
@Farhaan-td3dk
@Farhaan-td3dk 3 жыл бұрын
For anyone getting error TypeError: Assignment to constant variable. Use: var [loading, setLoading] = useState(false); instead of: const [loading, setLoading] = useState(false);
@SamFromaway
@SamFromaway 3 жыл бұрын
Thanks for the idea. Bit you shouldn't reassign react state. Use immutable programming. So if you want to change state use `setLoading(newState)`. Also, in modern javascript we only use const or if we reasign a value, we use let. I hope it helps.
@Farhaan-td3dk
@Farhaan-td3dk 3 жыл бұрын
@@SamFromaway I am new to JS and React, thanks for the info 😁
@seaNxgil
@seaNxgil 3 жыл бұрын
i luv u ty
@yogeshrajput5712
@yogeshrajput5712 3 жыл бұрын
Not working 😭
@the_seg_faulter
@the_seg_faulter 3 жыл бұрын
Trash tut.
Firebase - Back to the Basics
25:23
Fireship
Рет қаралды 600 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
React Authentication Crash Course With Firebase And Routing
56:00
Web Dev Simplified
Рет қаралды 660 М.
Firebase Tutorial With React Hooks
26:35
Baylor Breaks It Down
Рет қаралды 60 М.
React With Firebase/Firestore | CRUD and Queries | Version 9
14:27
Sam Fromaway
Рет қаралды 25 М.
Uploading Images to Firebase Storage in ReactJS
23:37
Hong Ly Tech
Рет қаралды 70 М.
I built a chat app in 7 minutes with React & Firebase
8:53
Fireship
Рет қаралды 1,4 МЛН
How to use Firebase Firestore with ReactJS. Firebase CRUD tutorial.
20:30
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН