Getting Started with Firebase 9 #5 - Adding & Deleting Documents

  Рет қаралды 95,137

Net Ninja

Net Ninja

2 жыл бұрын

Hey all, in this Firebase 9 tutorial I'll show you how to add new documents (save them) and also how to delete documents to and from the database collection.
🐱‍👤 Course files:
github.com/iamshaunjp/Getting...
🐱‍👤 My Premium Udemy courses:
thenetninja.co.uk/udemy/react...
thenetninja.co.uk/udemy/vue-a...
thenetninja.co.uk/udemy/moder...
thenetninja.co.uk/udemy/d3-an...
🐱‍👤 Get access to all other premium courses on Net Ninja Pro:
netninja.dev/
🐱‍💻 My Social Links:
Facebook - / thenetninjauk
Twitter - / thenetninjauk
Instagram - / thenetninja

Пікірлер: 78
@AronKvaszta
@AronKvaszta 5 ай бұрын
This is honestly the best firebase primer for anyone of any skill level. As always, incredible job explaining and showing how and why stuff is done. Thank you Shaun!
@NetNinja
@NetNinja 5 ай бұрын
Glad you enjoyed it! :) thanks Aron
@austinperrine23
@austinperrine23 Жыл бұрын
This playlist has brought my soul back to life. Thank you
@NetNinja
@NetNinja Жыл бұрын
Aha, glad to hear that Austin!
@monique2839
@monique2839 2 жыл бұрын
These tutorials are very beginner friendly and concise. Thank you Shaun for putting out such great content!!
@VasilBituniPhotography
@VasilBituniPhotography 2 жыл бұрын
'The name of the wind' and 'The way of kings' are my two favorite book series. I was happy when I saw you typing them haha. And as always, very helpful video!
@wusaby-ush
@wusaby-ush 2 жыл бұрын
Finally, I waited for this two days
@massimo8408
@massimo8408 Жыл бұрын
So far so good. I love your tutorials!
@geronimostilton5057
@geronimostilton5057 2 жыл бұрын
You helped me so much with this video! I was so confused about firebase syntax with their new version.
@tech3425
@tech3425 2 жыл бұрын
Great course! Looking forward to more indepth Firebase 9 courses
@ascodes3461
@ascodes3461 12 күн бұрын
Your Voice is really nice brother 😍😍 And these tutorials are amazing!!! Keep up the good work...
@bgrand-ch
@bgrand-ch 2 жыл бұрын
Thanks a lot! Firebase 9 is awesome and your videos too 🤘😎
@user-hm4dl9yt9o
@user-hm4dl9yt9o 5 ай бұрын
thank you, it's very helpful!
@Omerko
@Omerko 2 жыл бұрын
Really easy to use, even if version 9 comes with some crucial changes, it is really easy to update to it... Thanks for another video... :D
@edisonmondal2798
@edisonmondal2798 Жыл бұрын
Sir! You have saved my life ❤❤🔥🔥🖤🖤
@Loenbrad18
@Loenbrad18 Жыл бұрын
Awesome video series, going back to like the first 4 to show some love. 🤝
@NetNinja
@NetNinja Жыл бұрын
Much appreciated, thanks Brady!
@anasal-abood9649
@anasal-abood9649 Жыл бұрын
You are the ninja hero...
@alirezarezaei7416
@alirezarezaei7416 2 жыл бұрын
Thanks a lot. its very useful
@hashemalsaggaf9270
@hashemalsaggaf9270 Жыл бұрын
May the force be with you
@dimalukashenko4865
@dimalukashenko4865 Жыл бұрын
Good lesson, thanks
@NetNinja
@NetNinja Жыл бұрын
Thanks for watching Dima
@abbasmohamedwalaal5753
@abbasmohamedwalaal5753 2 жыл бұрын
wow very amazing
@IliyaDamyanov
@IliyaDamyanov 4 ай бұрын
Good video.
@josephmgift
@josephmgift Жыл бұрын
The best teacher.
@NetNinja
@NetNinja Жыл бұрын
Thanks Joseph, hope you found it helpful!
@josephmgift
@josephmgift Жыл бұрын
@@NetNinja Of course.
@jesse5785
@jesse5785 Жыл бұрын
how to delete a specific document id but without writing the id but with a button click?
@SwankyMarrow212
@SwankyMarrow212 Жыл бұрын
'The Way of Kings' is a great book
@SwankyMarrow212
@SwankyMarrow212 Жыл бұрын
Nooooo don't delete it!!!
@mohamedyoussef8835
@mohamedyoussef8835 2 жыл бұрын
Awesome Tutorial ++++++++++++++++++++ Thank You
@Musica-zp7zn
@Musica-zp7zn Жыл бұрын
How do we make it delete the doc without making the user know the doc id??? Implementing just a delete button and that's all ..
@mykoexe4135
@mykoexe4135 2 жыл бұрын
goated content
@earthycoin
@earthycoin 2 жыл бұрын
YOu are the best!
@hasanuralam8403
@hasanuralam8403 2 жыл бұрын
thanks dudu
@davidmendoza1477
@davidmendoza1477 Жыл бұрын
what if i want to delete a document but i dont want to have to write the id. I mean, if this was a real application then the user wouldn't have acces to that information and therefore wouldn't be able to delete the 'book' from the database. So the developer (us) has to handle that for the user. So our code needs to have access to the id of the 'book' object in our database that our UI 'book' object makes reference to. How do we do that?
@junaidt7553
@junaidt7553 Жыл бұрын
thank you so much
@NetNinja
@NetNinja Жыл бұрын
You're very welcome!
@jhonlee788
@jhonlee788 2 жыл бұрын
Hello ! I wanted to know if you will make a firebase tutorial for React-Native ? Or is this current tutorial is easy to reapply on a react-native project ? Thank you in advance !
@nobodyeverybody8437
@nobodyeverybody8437 Жыл бұрын
Tanx for the tutorial, I'm just wondering, why didn't you define the "id" attribute of "input" elements? I guess the "label" element have now difficulties to find the object defined in "for" attribute.
@meinkyelisee841
@meinkyelisee841 2 жыл бұрын
Thanks for this very clear tutorial But please , is it the same logic for react native ?
@pagevpetty
@pagevpetty 2 жыл бұрын
Thanks for the vids! Just wondering why this example of addDoc is different from the addDoc example in your Udemy course?
@geebsayshi
@geebsayshi 2 жыл бұрын
Can you delete a document specified by a filter or delete is only done with an ID ?
@aaron_phillips
@aaron_phillips 2 жыл бұрын
Hello. Trying to follow along, but I'm using Vue. Is there different syntax used for Vue? I keep getting errors when using querySelector.
@cubedev4838
@cubedev4838 2 жыл бұрын
Please make firebase anlytics also
@iamnate791031
@iamnate791031 2 жыл бұрын
there's a simple question still bother me why we use addDoc() function , we just directly use colRef as a parameters but in the deleteDoc() function , we need to use doc() at first?
@AnsBdran
@AnsBdran Жыл бұрын
7:00 is it possible to get a document reference by passing just the collection refecrence and the id without the db?
@danielmartinezvillegas4166
@danielmartinezvillegas4166 2 жыл бұрын
how can I split the code up in multiple files, just calling the firebase functions anywhere i need them ???
@pipaliyaashish4832
@pipaliyaashish4832 2 жыл бұрын
Any way to hide firestore credentials from source panel ( dev tools)?
@bemotivateddaily271
@bemotivateddaily271 2 жыл бұрын
Thank you netninja thank you, am a Nigerian I have tried to join your channel with my card but it is not working, I guess I will keep on trying other cards
@Chinni0913
@Chinni0913 2 жыл бұрын
When I add would like to store data like title and author, the database stores 2times. How can I resolve my issue?
@Locus.B
@Locus.B 2 жыл бұрын
Very useful but I could use some help on the adding and deleting part because I need to make those functions in vue and don’t really know how. Can any1 help?
@zoozolplexOne
@zoozolplexOne 2 жыл бұрын
Cool !!
@Richard.halabi
@Richard.halabi 2 жыл бұрын
the collection has an id right ?
@dolapoadefisayomioluwole1341
@dolapoadefisayomioluwole1341 2 жыл бұрын
👍 netninja
@anoopthomas2746
@anoopthomas2746 Жыл бұрын
Please say how to set uid of my user as document id .please
@atifali3485
@atifali3485 Жыл бұрын
im having problem, if i comment entire the idex.js file it performs the add and remove regardless
@gogouniverse9375
@gogouniverse9375 Ай бұрын
throwing an error when adding object properties in addDoc(colRef,{}),can you help how to solve
@Lostpanda123
@Lostpanda123 2 жыл бұрын
Can the API Key be stored on a env. File? Or is there another way to secure the code?
@jondenjack
@jondenjack 2 жыл бұрын
Use firebase rules According to the firebase docs: The content is considered public, including your platform-specific ID (entered in the Firebase console setup workflow) and values that are specific to your Firebase project, like your API Key, Realtime Database URL, and Storage bucket name. Given this, use security rules to protect your data and files in Realtime Database, Cloud Firestore, and Cloud Storage.
@zergzerg4844
@zergzerg4844 10 ай бұрын
Hello. I do the same thing on 5:20 but the addDoc method create duplicate data in the firestore database. WHy does your method works correctly ?
@zergzerg4844
@zergzerg4844 8 ай бұрын
@@DiffuserCapital I already fix it. Yes, it submitted twice.
@chubbyBunny94
@chubbyBunny94 Жыл бұрын
I'm getting this error: Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec. anyone got a clue?
@alexpiano
@alexpiano 2 жыл бұрын
Any chance to use async await? I tried but I think something else needs to be configured.. const snapshot = await getDoc(colRef); const books = snapshot.docs.map((doc) => ({ //for each document we return an object with the data and the id ...doc.data(), //this method allows obtaining the stored data for each doc. id: doc.id, }));
@jannickpedersen4620
@jannickpedersen4620 Жыл бұрын
A code example of mine: const fetchPost2 = async () => { await getDocs(collection(db, "usercaseRight")) .then((querySnapshot)=>{ const newData = querySnapshot.docs .map((doc) => ({...doc.data(), id:doc.id })); setUsercaseRight(newData); } ) } useEffect(()=>{ fetchPost2(); }, []) ////////////////////////////////////////// - Then in the render { usercaseRight?.map((usercaseRight, k)=>( {usercaseRight.titel} {usercaseRight.tekst} )) }
@mehtabahmad__
@mehtabahmad__ 2 жыл бұрын
waiting for firebase in react native cli.......................
@manoj-k
@manoj-k 2 жыл бұрын
🔥🔥🔥
@fre.helfer
@fre.helfer Жыл бұрын
I love you
@bblash9560
@bblash9560 2 жыл бұрын
Sorry but why do I get a "can't find variable: document" ?
@ShubhamKumar-hm8bc
@ShubhamKumar-hm8bc 2 жыл бұрын
The delete is not working, there is no error, but the data isn't deleted at all.
@cubanezu33
@cubanezu33 9 ай бұрын
sa iti dea dumnezeu sanatate ca ne inveti ca pe prosti ce si cum! Bv.
@PsychoDude
@PsychoDude 2 жыл бұрын
I WANT TO ADD AN ID NAME not a random
@kacperkepinski4990
@kacperkepinski4990 7 ай бұрын
there is no file
@ransomecode
@ransomecode 2 жыл бұрын
Get Sarted with Firebase.... 😂😂
@ransomecode
@ransomecode 2 жыл бұрын
please correct the title of the video!
@OperationAndrew.
@OperationAndrew. Жыл бұрын
When I push to the database I get this issue: "core.min.js:8 POST [IP made anon]/[project made anon]/site/public/bat/rd-mailform.php 405 (Method Not Allowed)" any ideas on how I can fix
@agomcago
@agomcago 2 жыл бұрын
Please how can I add pictures (or other media files) alongside other data (text)? I've been struggling with it for a while now. Got this when I tried the first time: "C:\fakepath\1.jp"
Was ist im Eis versteckt? 🧊 Coole Winter-Gadgets von Amazon
00:37
SMOL German
Рет қаралды 29 МЛН
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 9 МЛН
MEU IRMÃO FICOU FAMOSO
00:52
Matheus Kriwat
Рет қаралды 42 МЛН
Did you believe it was real? #tiktok
00:25
Анастасия Тарасова
Рет қаралды 23 МЛН
Model Relational Data in Firestore NoSQL
9:13
Fireship
Рет қаралды 369 М.
Getting started with Cloud Functions
19:26
Firebase
Рет қаралды 33 М.
Do we really need firebase in 2023
10:47
Hitesh Choudhary
Рет қаралды 114 М.
Getting Started with Firebase 9 #7 - Firestore Queries
4:00
Net Ninja
Рет қаралды 57 М.
Firebase - Back to the Basics
25:23
Fireship
Рет қаралды 582 М.
Getting started with Firebase for the web
10:59
Firebase
Рет қаралды 342 М.
Was ist im Eis versteckt? 🧊 Coole Winter-Gadgets von Amazon
00:37
SMOL German
Рет қаралды 29 МЛН