Firebase Firestore Tutorial #5 - Deleting Data

Net Ninja · 98K views · 2018 · 5:47

Open on YouTube

Web developmentDatabases & storagetutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when answering or asking how to delete a Firestore document from a web app, though one asker notes its older Firebase version needs code changes.

Recommended by 2 people across 2 different months, 2020 to 2022.

What it is

A short Net Ninja tutorial, part 5 of a Firebase Firestore series, showing how to delete documents from a Firestore database in a JavaScript web app. It is a screen-recorded code walkthrough that follows the series' running example.

What people said

Recommends Mickers · 2020-01 · Stack Overflow · on “How can I delete data from firebase thru web app?”

I've not worked with firebase but here's a quick video [this video] I found on how to achieve what you're trying to do.

Recommends MELLAL Fethi · 2022-02 · Stack Overflow · on “how to delete firebase Firstore document”

I hope you are doing great. I will share with you two links to a beautiful tutorial about your question from YouTube. For firebase v9: [LINK] For earlier version (like yours): [this video] I'm sorry that I didn't write the code but I saw your question and I was so tired, and I wanted to help with anything useful.

Cites programming newbee · 2021-11 · Stack Overflow · on “Error: Uncaught (in promise) TypeError: doc is not a function at HTMLButtonElement.<anonymous>”

So, I have tried to follow The Net Ninja tutorial for my website. Here is the tutorial link [this video] that I have followed. But I have to change some codes since their firebase version is old. What I'm trying to do is to delete the row but this error came out: Uncaught (in promise) TypeError: doc is not a function at HTMLButtonElement.<anonymous> This is the javascript coding: function renderList(doc){ let trow = document.createElement('tr'); let td1 = document.createElement('td'); let td2 = document.createElement('td'); let ControlDiv = document.createElement("div"); const date = doc.data().created.toDate().toDateString(); trow.setAttribute('data-id', doc.id); td1.textContent = doc.data().ema