Tell us what’s happening:
Your code so far
const List = (props) => {
return <p>{props.tasks.join(", ")}</p>;
};
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={["Jump", "Laugh", "Cry"]} />
<h2>Tomorrow</h2>
<List lists={["Love", "Code", "Smile"]}/>
{ /* change code above this line */ }
</div>
);
}
};
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:76.0) Gecko/20100101 Firefox/76.0
.
Challenge: Pass an Array as Props
Link to the challenge:
What is wrong with my code? Thank you for helping.