Pass an Array as Props in React

Pass an Array as Props in React
0.0 0


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) => {

class ToDo extends React.Component {
  constructor(props) {
  render() {
    return (
        <h1>To Do Lists</h1>
        { /* change code below this line */ }
        <List tasks={["one", "two"]}/>
        <List tasks={["one", "two", "three"]}/>
        { /* change code above this line */ }


There should be a space after the comma when you join the items. At the minute it will come back like “one,two,three” and it should be “one, two, three”


It worked , thank you