Home > Software design >  React adding data from api to array problem
React adding data from api to array problem

Time:09-02

I wanted to add the data in array from api and I want print array enter image description hereay

CodePudding user response:

.then(res => {
    mapArrayi.push(res.data);
    console.log(mapArrayi[0]);
});
  • Related