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

333
Views
Presionar elemento agrega elemento a la lista pero no aumenta en longitud pero aparece en console.log, pero no me permite imprimir por índice

Mi código:

 useEffect(() => { var tempList = [] axios.get("#url") .then(res =>{ res.data.Items.map((eachARN)=>{ axios.get("#url" + res.uuid.S) .then(res =>{ tempList.push(res.data.Item.uuid.S) }) .catch(err =>{ console.log(err); }) }) console.log("templist length: "+tempList.length) console.log(tempList) setposts(tempList) }) .catch(err =>{ console.log(err); }) }, [])

El registro de la consola muestra: [ingrese la descripción de la imagen aquí][1]

Entonces, me muestra todos los elementos que quiero enviar, pero de alguna manera no están en la lista, se están imprimiendo como en la lista, pero la longitud es 0 [1]: https://i.stack.imgur.com/p0pjR .png

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!