It seems like I do not know how to do some of the steps.
ToDo should return a single outer div
const List = (props) => {
{ /* Change code below this line */ }
const today = today.props;
const todayTasks = today.map((task) => <p>{task.join(",")}</p>);
const tomorrow = tomorrow.props;
const tomorrowTasks = tomorrow.map((task) => <p>{task.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={todayTasks} />
<h2>Tomorrow</h2>
<List tasks={tomorrowTasks} />
{ /* Change code above this line */ }
</div>
);
}
};
const today = ["walk two hours", "lace sandals"];
const tomorrow = ["distract from eating", "interrupt brooding with positivity", "meditate"];
**Your browser information:**
Challenge: Pass an Array as Props
Link to the challenge: