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

194
Visualizações
How to get and overwrite a string in Firebase DB - React native

I am trying to get a string from a firebase real-time database, add something to it and overwrite it back into the firebase DB.

When I try to do this I get the error :

TypeError: db._checkNotDeleted is not a function. (In 'db._checkNotDeleted('ref')', 'db._checkNotDeleted' is undefined)

Any idea how to get past this error?

For example, I want to get "lol=" string from the firebase DB and add "buzz=" to the string and override "lol=buzz=" in the same place in firebase.

And after I want to split the string by "=" to get each word.

I know that this could be done with arrays but I can't figure a way of writing the code for it.

import { getDatabase, ref, onValue, child, set, get } from "firebase/database";
...
const handleBarCodeScanned = () => {

    data = "PS=1"
    const spl = data.split("=");
    //GET all students from attendance
    let saveList = "";
    const dbRef = ref(getDatabase());
    get(child(dbRef, `prezente/${spl[0]}/lista_prez${spl[1]}`))
      .then((snapshot) => {
        if (snapshot.exists()) {
          console.log(snapshot.val());
          let saveList = snapshot.val().saveList;
          saveList += "=";
          saveList += props.route.params.saveUserInfo.email;
          return saveList;
        }
      })
      .then((saveList) => {
        console.log(saveList);
        const x = ref(getDatabase());

        set(ref(x, `prezente/${spl[0]}/lista_prez${spl[1]}`), {
          saveList,
        });
      });
} 

firebase_db

about 4 years ago · Juan Pablo Isaza
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