Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

178
Visualizações
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 Respostas
Responde à pergunta

0

It was just remove(userRef); My apologies

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda