https://learn.freecodecamp.org/front-end-libraries/react/pass-an-array-as-props
The only condition it says I’m not meeting is “The List component should render the value from the tasks prop in the p tag,” but I am using the
tag:
return <p> {props.tasks.join(",")} </p>
This is my entire code for this challenge, if that helps:
const List= (props) => {
{ /* change code below this line */ }
return <p> {props.tasks.join(",")} </p>
{ /* change code above this line */ }
};
class ToDo extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<h1>To Do Lists</h1>
<h2>Today</h2>
{ /* change code below this line */ }
<List tasks={["test","test"]} />
<h2>Tomorrow</h2>
<List tasks={["test","test","test"]} />
{ /* change code above this line */ }
</div>
);
}
};