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

182
Views
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
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!