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

344
Views
useEffect siempre se ejecuta en React js (se usa firebase firestore)
 const [bag, setBag] = useState([]); const bagRef = collection(db, "users", auth.currentUser.email, "bag"); const updateBag = () => { onSnapshot(bagRef, (snapshot) => { // ... setBag( snapshot.docs.map((doc) => ({ id: doc.id, data: doc.data(), })) ); console.log("run"); }); }; useEffect(() => { updateBag(); }, []);

mi problema es que useEffect siempre se está ejecutando, puedo ver que, dado que 'ejecutar' se muestra en mi consola, y mi uso de firestore está aumentando, intenté pasar diferentes argumentos en '[]' como bag, bagRef, auth.currentUser.email y no funcionó Gracias por adelantado :)

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!