Question:
I am storing the response from an API in an array called Products. This array stores the objects returned. I am displaying the title property of the objects in a div. But getting objects cant be child elements in React error. What should I do? Also, I have tried rendering the products title (eg: Products[0].title) but even this doesn’t work. But this is not an object. So why doesn’t this work?Code on React:
Answer:
you can do thisIf you have better answer, please add a comment about this, thank you!