Home > Blockchain >  How to pass these array location attribute in to setState and and display the value
How to pass these array location attribute in to setState and and display the value

Time:10-28

I want to access to these array location attributes and How to pass loaction to the setstate and display them inside the return state (react functional component used)

enter image description here

![enter image description here

enter image description here

enter image description here

CodePudding user response:

since response.data.exsitingSupplierDetails is an Array of length = 1, you can access the location like this:

response.data.exsitingSupplierDetails[0].location

  • Related