Firebase Firestore Tutorial #5 - Deleting Data

Firebase Firestore Tutorial #5 - Deleting Data

Net Ninja

6 лет назад

96,210 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@KiteTijink
@KiteTijink - 04.06.2018 14:42

Loving the series so far! Great work.

Ответить
@yamansayed
@yamansayed - 04.09.2018 12:52

you are great man

Ответить
@rasimyilmaz
@rasimyilmaz - 31.10.2018 15:51

This video's very usefull , thank you very very much . I love this course .

Ответить
@maxipop1000
@maxipop1000 - 28.11.2018 20:04

For accessibility a Button is a better option :) Good job btw I love your tuts

Ответить
@DigitalMonsters
@DigitalMonsters - 22.01.2019 17:52

instead of cross.innerText = "x";
can also say cross.innerHTML = "×";

Ответить
@vladyslavakolosova761
@vladyslavakolosova761 - 06.04.2019 11:43

omg the best tutorial ever

Ответить
@ohwanqi7288
@ohwanqi7288 - 17.07.2019 08:40

How to get the id for realtime database?

Ответить
@loumos8364
@loumos8364 - 19.03.2020 00:26

FireBase is not a industry standard and the methods he is using in this tutorial are not secure.

Ответить
@charlesorafu490
@charlesorafu490 - 17.04.2020 02:35

Awesome well done

Ответить
@xxsebaignacioxxgomez5019
@xxsebaignacioxxgomez5019 - 17.04.2020 08:09

Helped me a LOT !
Thank you very much !!!!!!!!!!

Ответить
@kashif_alie
@kashif_alie - 05.05.2020 10:50

I was getting error "Uncaught FirebaseError: Function Query.get() requires its first argument to be of type object, but it was: "rF9R7do0SC3IKD4aqkhn"" while deleting the id, then i removed your db.collection('cafes').doc(id).delete(); to db.collection("cafes").doc(id).delete().then(function() {
console.log("Document successfully deleted!");
}).catch(function(error) {
console.error("Error removing document: ", error);
});
and it's working fine now!
Thanks again for your tutorials - coming from relational databases into NoSQL feels hard to learn but your explanation is awesome, keep it up..:)

Ответить
@mdjahidulislam9205
@mdjahidulislam9205 - 09.05.2020 05:21

Hi, would you please show ,how to deploy this web app into server?

Ответить
@lukecross5439
@lukecross5439 - 12.06.2020 19:14

Is possible create auto delete data (free)?

Ответить
@abhinavsharma2522
@abhinavsharma2522 - 21.06.2020 07:36

why dont you use autocomplete. it really makes me sick.

Ответить
@Pedro-no7hd
@Pedro-no7hd - 30.06.2020 09:16

Your tutorial is just what I was looking for, sample and complete, it's helping me a lot

Ответить
@ms.emirhan
@ms.emirhan - 06.08.2020 20:15

Amazing man. Amazinggggggg

Ответить
@lukecross5439
@lukecross5439 - 12.08.2020 17:08

how i can delete data scheduled? example, exclude old documents (dataServer < dataToday) from specific collection at the every day (7:00PM hours)

Ответить
@samsul_dev
@samsul_dev - 12.08.2020 22:54

is safe to execute firebase logic code in the client side?

Ответить
@MDDanishAnsariDev
@MDDanishAnsariDev - 27.08.2020 20:47

Can't we just directly do "doc.delete()" since we already have that in renderCafe() function's parameter?

Just a question

Ответить
@byedwardleung
@byedwardleung - 03.09.2020 17:54

this is literally something I needed to get a bit of backend storage. nice and simple!

Ответить
@renukagargicollege1486
@renukagargicollege1486 - 05.09.2020 16:47

thanks for this awesome tutorial.

Ответить
@user-un2qi4eo9n
@user-un2qi4eo9n - 29.11.2020 00:59

It's not a "cross" it's an "eX"! Damint!

Ответить
@shameekagarwal4872
@shameekagarwal4872 - 03.12.2020 06:32

use this to update list as well

const deleteData = async (e) => {
const cafeId = e.target.parentElement.getAttribute("data-id");
await db.collection("cafes").doc(cafeId).delete();

const cafe = document.querySelector(`[data-id='${cafeId}']`);
// handle multiple clicks in succession
if (cafe) {
cafe.remove();
}
};

Ответить
@jamtheham5003
@jamtheham5003 - 16.12.2020 14:21

You saved my day!

Ответить
@JohnSlipper
@JohnSlipper - 23.12.2020 11:41

To keep actions keyboard focusable and accessible it's good to always use a button element for actions like the delete shown here. I realise it's not the purpose of the video but good practice anyways.

Ответить
@aram5642
@aram5642 - 24.02.2021 01:33

One should listen on the parent element instead. When removing a cafe element without removing the listener you create a memory leak. Having one listener and delegating the operation by data-id your code is healthier

Ответить
@darkl3iaX
@darkl3iaX - 05.03.2021 01:25

Wow, you are so awesome at explaining, GJ right there. KUDOS

Ответить
@prashoonbhattacharjee8211
@prashoonbhattacharjee8211 - 10.03.2021 20:53

Very helpful video!!

Ответить
@abraiyan7984
@abraiyan7984 - 16.04.2021 08:22

To delete a particular item, I am using the {doc.id} from the parameter, not doing that reverse engineering in the renderCafe() function and it works. Are there any consequences to that approach?

Ответить
@pavelsjo
@pavelsjo - 01.05.2021 03:48

D: Just Amazing!

Ответить
@codedusting
@codedusting - 12.05.2021 18:27

Anyway to do it using fetch API DELETE request?

Ответить
@johnwilliams983
@johnwilliams983 - 03.06.2021 18:51

I'm getting the following error: FirebaseError: Function CollectionReference.doc() cannot be called with an empty path. I tried everything to fix it, with no luck. Any help would be welcomed.

Ответить
@MT4d616e
@MT4d616e - 04.06.2021 12:11

heyy man plz reply to this...... I created guides from your other firestorm lectures but now I want a delete functionality just like this on that code but its not happening.... plz help

Ответить
@JerrysTechCorner
@JerrysTechCorner - 10.06.2021 07:28

You are awesome! The best tutorials so far I have seen!

Ответить
@noobcoding9711
@noobcoding9711 - 11.06.2021 11:51

Does anyone know how to remove the item on the list after clicking the cross button to delete? What I want is that I don't need to refresh the page to update the list

Ответить
@jamesmac5902
@jamesmac5902 - 16.06.2021 18:31

So no update on how to doc(id).delete(); 😞

Ответить
@himanshulal97
@himanshulal97 - 25.06.2021 11:58

sir god bless u good bless u god bless u sir u saved my assignmet , i had to submit it at 3pm

Ответить
@wemplatform1951
@wemplatform1951 - 08.07.2021 18:55

Sir can you help me in firebase could . i need a same function code in firebase could. Not realtime firebase.

Ответить
@wemplatform1951
@wemplatform1951 - 08.07.2021 19:02

Sir can you help me in firebase could . i need a same function code in firebase could. Not realtime firebase. i want to do that with button . plz help me

Ответить
@piyushgaur6975
@piyushgaur6975 - 03.08.2021 12:41

what is db???

Ответить
@reagandesigns6432
@reagandesigns6432 - 13.07.2022 22:37

Is there a way to delete sub collection?

Ответить
@scars5019
@scars5019 - 29.07.2022 18:21

i cant seem to delete a document by using a html input field and matching it to a field within a document on firestore. Can someone please help me out because this video doesn't really work for me for some reason.

Ответить
@rookieoftheyear1877
@rookieoftheyear1877 - 05.11.2022 10:14

DUDE THANK YOU THANK YOU THANK YOU. I knew there just had to be a simple way to do this and you got on with it.

Ответить
@Martin958
@Martin958 - 29.05.2023 16:20

How is the <div> element that contains the 'x' staying inline with the <spans>, since a <div> is a block element? Does the CSS file have instructions to do that? Or can you include a <div> inside of an <li> element, and thus be presented inline as default that way?

Ответить