I have an array of 3 objects
const parts = [
{
name: "Fundamentals of React",
exercises: 10
},
{
name: "Using props to pass data",
exercises: 7
},
{
name: "State of a component",
exercises: 14
}
];
I can get all objects content on the console
parts.forEach((value) => {
console.log(value);});
I want to use the Content component to display the content of the array of objects, but I can´t figure out how to do it.
On the code below I try to log the props, but I am not getting any, so nothing is rendered.
const Content = (props) => {
console.log(props);
return <div><h1>{props.parts}</h1></div>;
