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

193
Views
Cómo obtener y sobrescribir una cadena en Firebase DB - React native

Estoy tratando de obtener una cadena de una base de datos en tiempo real de firebase, agregarle algo y sobrescribirlo nuevamente en la base de datos de firebase.

Cuando trato de hacer esto me sale el error:

TypeError: db._checkNotDeleted no es una función. (En 'db._checkNotDeleted('ref')', 'db._checkNotDeleted' no está definido)

¿Alguna idea de cómo superar este error?

Por ejemplo, quiero obtener la cadena "lol=" de la base de datos firebase y agregar "buzz=" a la cadena y anular "lol=buzz=" en el mismo lugar en firebase.

Y después quiero dividir la cadena por "=" para obtener cada palabra.

Sé que esto podría hacerse con matrices, pero no puedo encontrar una forma de escribir el código para ello.

 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!