I know this problem is already mentioned but I can’t find the solution. I also fixed spaces in
tag but I am still having problem and getting the last error.
The List component should render the value from the tasks prop in the p tag.
Here is the code , please help, thanks
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={["one", "two"]}/>
<h2>Tomorrow</h2>
<List tasks={["one", "two", "three"]}/>
{ /* change code above this line */ }
</div>
);
}
};