Skip to content
Advertisement

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

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

Advertisement

Answer

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

response.data.exsitingSupplierDetails[0].location

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement