I’m new to learning react and passing props to child components is still confusing to me.
I passed an array of objects from express server to react app with axios, the react app first uses .stringify() and then uses .parse() and then i updated the state variable
enter image description here
Outside the UseEffect and within the return statement when i try to access the books useState variable i can only console.log its values but it doesn’t render when i map and try to pass it to a child component
enter image description here
This is the Book Component
enter image description here
What is causing it to not render?
I’ve tried different ways to iterate through and also rendered the book component by itself and it renders then but doesn’t render when i pass it the objects values.
Aarya Kasbe is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.