How To Set Up React With Firebase/Firestore | CRUD Functions | Part 2

  Рет қаралды 13,177

Sam Fromaway

Sam Fromaway

Күн бұрын

Пікірлер: 21
@SamFromaway
@SamFromaway 2 жыл бұрын
NEW VIDEO Version 9: kzbin.info/www/bejne/Y6rVn4qkg5Wab9E 👈
@vladaliniuga
@vladaliniuga 4 жыл бұрын
Great content! I've been searching around youtube for information on these subjects and this is the most complete solution I found. I like the approach where you writhe the code behind the scene, it saves a lot of time. Also it would be nice to see a solution for pulling data from a specific field in a document and displaying it, for example crating an user with a "user info" collection including "full name" and "address" then pulling only the name from the collection and displaying that instead of the email.
@mauroavellaneda9019
@mauroavellaneda9019 3 жыл бұрын
I agree. By the way, since you wrote this comment 6 months ago, I would like to ask if you tried to do it? It would help me in some days ahead.
@mooder3247
@mooder3247 3 жыл бұрын
i dont know how to thank you you litrally saved my life i was working on something similar and stupidly i had a tiny bug that ruined everything so when i saw your repo i knew where i made the bug and i fixed thank you soooooo much
@SamFromaway
@SamFromaway 4 жыл бұрын
By the way, I mixed up "Parameter" and "Argument" a lot in this video. If you want to know the difference check out this video: kzbin.info/www/bejne/h3OXcqmigsiamdU
@vladkramar3123
@vladkramar3123 3 жыл бұрын
Thanks for the tutorial! It was exactly what I'm looking for! It would be even better if you show how user can upload an image and then fetch it from a database!
@SamFromaway
@SamFromaway 3 жыл бұрын
Then you need image storage and only put the url of the image in the document of firestore to reference it. You can host images for Example with google cloud...
@shanuv000
@shanuv000 3 жыл бұрын
Thank you very much! for this tutorial.🥺
@crisc.castillo979
@crisc.castillo979 3 жыл бұрын
YOU ARE THE BEST!
@puneetsingh9678
@puneetsingh9678 3 жыл бұрын
Thank you, it helped me a lot
@tronganhnguyenthanh1157
@tronganhnguyenthanh1157 3 жыл бұрын
The file .env, do we need to install the library that called dot-env in our project ?
@okidokiyowyow356
@okidokiyowyow356 3 жыл бұрын
Hey man. I tried this but instead of school, I use comments. Now everytime I will add comment, it will get duplicate then I have to refresh, then its gone. Another problem is, the new comment dont get add to the last list and they get place randomly. Im using the snapshot code.
@iamlande3979
@iamlande3979 4 жыл бұрын
kinda big gap between the end of the 1st part and the beginning of second, I mean u did a lot of code "behind the scene"
@SamFromaway
@SamFromaway 4 жыл бұрын
Thanks for the feedback. IMO it was just the SnapshotFirebase component and the GetFirebase component which I tried to explain thoroughly in the video. Would it be more helpful if I made a video with the whole process explained?
@iamlande3979
@iamlande3979 4 жыл бұрын
​@@SamFromaway well u did a great job actually. I have never come across snapshot method as tuts I have watched explains only get method w/o mentioning snap. I used to do tuts step by step so it was kinda new for me to see the whole code done before the video, it is not bad just different. You also did some CSS code behind the scene which changes the view of the app and I think it's worth mentioning. As a complete newbie I also have a question: is there a way to transfer some data from one collection to another? For example, let's say that one school became out of order and we can't just delete it like it never existed, for this we have another collection, for example, "archive". And I am going to the third part of your guide :)
@SamFromaway
@SamFromaway 4 жыл бұрын
@@iamlande3979 Thanks for the feedback, yes exactly I wanted to do it a little bit differently like other tutorials and hope my style is clear enough. About your question: The general idea of Firestore is to have a "flat structure" that means you have data in (if possible) one place only and manipulate it there. So I would rather re-purpose the delete button, and if instead of deleting the document, the button would change the value of a key value pair named (e.g.) visability, to archived. (This is a common data structure for the issue you are describing) And then when displaying the data on the onSnapshot you add: where(‘visability’, !=, ‘archived’) or even better add a visibility key to all documents and set them to public in the beginning and filter like that: where(‘visability’, ==, public). So you would have a definite key to say which documents should be shown. I hope this makes sense. :D
@SamFromaway
@SamFromaway 4 жыл бұрын
@@iamlande3979 ah and if you still would need that data would communicate between different collections you would do that with "cloud functions" firebase.google.com/docs/firestore/extend-with-functions
@iamlande3979
@iamlande3979 4 жыл бұрын
@@SamFromaway I believe I got the idea, will try to do that, thanks :)
@1234n-i4u
@1234n-i4u 3 жыл бұрын
Thank you very much
@pjguitar15
@pjguitar15 3 жыл бұрын
IDK why delete function doesn't work for me. I literally just copied your code from github haha
@hilarion_aggey
@hilarion_aggey 2 жыл бұрын
Hello
How To Set Up React With Firebase/Firestore | Authentication | Part 3
10:27
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
100 Firebase Tips, Tricks, and Screw-ups
24:31
Fireship
Рет қаралды 192 М.
Junior vs Senior React Folder Structure - How To Organize React Projects
16:16
Firebase - Back to the Basics
25:23
Fireship
Рет қаралды 600 М.
How To Use Firebase / Firestore Database With React JS
18:15
Ashish Nallana
Рет қаралды 19 М.
I tried 8 different Postgres ORMs
9:46
Beyond Fireship
Рет қаралды 442 М.
The TRUTH About Golang Backend Frameworks
6:31
Melkey
Рет қаралды 135 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН