Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

174
Views
I can't find the good use of a firebase remove object

I tried to use the new remove() function that is written in the Firebase Realtime Database documentation, but I can't really figure out how to actually remove the data. I get an error saying userRef.remove() is not a function. But I have no idea how to actually use it.

This is the code that gives me that message:

document.getElementById("yes-delete").addEventListener('click', (e) =>{
                  const userRef= ref(db, 'users/' + user.uid);
                  userRef.remove();
              });

This is the error message I'm getting:

Uncaught TypeError: userRef.remove is not a function at HTMLButtonElement. ((index):209)

This is what they write on Firebase documentation:

Delete data

The simplest way to delete data is to call remove() on a reference to the location of that data.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

It was just remove(userRef); My apologies

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!