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

188
Views
Obtenga documentos de Firebase, pero si ya se muestran, no vuelva a mostrarlos.

Tengo el siguiente código:

 const getFromFirebase = () => { //1. let storageRef = storage.ref(`${user1}/${currentItem.id}`); //2. storageRef.listAll().then(function (res) { //3. res.items.forEach((imageRef) => { imageRef.getDownloadURL().then((url) => { //4. if (allImages.indexOf(url) === -1) { setImages((allImages) => [...allImages, ({Test : url, Test2 : imageRef.name})]); } }); }); }) .catch(function (error) { console.log(error); }); };

Estoy llamando a esta función en una pestaña al hacer clic; funciona porque muestra los documentos, pero si hago clic en la pestaña nuevamente, simplemente se repite. ¿Cómo verifico que si todos los documentos ya se muestran para no duplicarse?

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

0

trabajar con la función de devolución de llamada, no ingresó una matriz vacía.

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!