question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React: Pass an Array as Props challenge clarify wording on test

See original GitHub issue

Describe your problem and - if possible - how to reproduce it

The last test in this challenge doesn’t explain what is expected in enough detail. I came across the same issue as in #17758

I suggest fixing this by changing the text of the last test from: The List component should render the value from the tasks prop in the p tag. to The List component should render the value from the tasks prop in the p tag as comma delimited text e.g. walk dog, workout

I’m happy to do the change if the wording looks correct

Add a Link to the page with the problem

https://learn.freecodecamp.org/front-end-libraries/react/pass-an-array-as-props

Tell us about your browser and operating system

n/a

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
peterjgraingercommented, Oct 5, 2018

@nirajn2311 you are absolutely right the instructions are very concise. I am probably not clear enough in my communication. I was referring to the tests for that challenge. All of the other react challenges have tests that are very specific about what text is expected in the p tag, this seems the odd one out. If join(',') is used instead of join(', ') then it’s hard to figure out what is wrong as the test checks the exact format of the text and there is no feedback on what the issue is.

At least two people have been caught out so I can’t see the harm in adding more specific text?

I don’t mind doing the change myself

0reactions
ezioda004commented, Oct 16, 2018

Closing, as the issue got resolved in https://github.com/freeCodeCamp/freeCodeCamp/pull/18279

Read more comments on GitHub >

github_iconTop Results From Across the Web

React — Problems with passing array as a prop - Vasanth Bhat
Let me explain, how react props works. In very simple words props behave the same way as arguments to a function.
Read more >
Pass an Array as Props - React - Free Code Camp - YouTube
In this React tutorial we pass an array as props. This video constitutes one part of many where I cover the FreeCodeCamp ...
Read more >
"React js" How to pass array data using props? - Stack Overflow
Currently I'm trying to pass array data from that <button></button> into <StudentInfo /> and replace the name = {"Amira"} Can anyone help me ......
Read more >
Destructuring of Props in ReactJS - GeeksforGeeks
Destructuring is a simple property that is used to make code much clear and readable, mainly when we pass props in React.
Read more >
45 Advanced React Interview Questions (With Hooks) Devs ...
Props are inputs to a React component. They are single values or objects containing a set of values that are passed to React...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found