Don't know what I'm doing wrong in "React: Pass an Array as Props"

Don't know what I'm doing wrong in "React: Pass an Array as Props"
0.0 0

#1

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>
      );
     }
     };

#2

It looks to me like in the instructions, that there is a space after the comma in the join string.


#3

You are correct, but fixing that hasn’t remedied the problem :confused:


#4

OK, then also the spaces inside the p tags - those are being rendered and throwing off the test.


#5

OK yeah that was it, thanks!