So currently I'm pulling items from the backend using a service using axios.get() now on my actual file that pulls the service. I use useEffect() to call the service there it calls it, but sometimes I get an empty array [] but when I click on it, it actually contains an object with items do you happen to know why and what I could do to fix it so I can map through the items.
Asked
Active
Viewed 29 times
0

Christian Gonzalez
- 107
- 1
- 3
- 9
-
Let's not look at any console log for a minute. Is everything working perfectly at UI? Is it rendering properly, probably, using `.map`? – Ajeet Shah Feb 01 '21 at 16:42
-
Maybe post the ```useEffect``` code pulling this data? – Muteshi Feb 01 '21 at 16:45