Passed "React: Pass Props to a Stateless Functional Component" challenge with wrong solution
See original GitHub issueDescribe your problem and how to reproduce it: I passed the “React: Pass Props to a Stateless Functional Component” challenge with wrong solution as below, correct answer is commented beside:
const CurrentDate = (props) => {
return (
<div>
{ /* change code below this line */ }
<p>The current date is: {Date()}</p>//<p>The current date is: {props.date}</p>
{ /* change code above this line */ }
</div>
);
};
class Calendar extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<h3>What date is it?</h3>
{ /* change code below this line */ }
<CurrentDate date="date"/>//<CurrentDate date={Date()} />
{ /* change code above this line */ }
</div>
);
}
};
Add a Link to the page with the problem: https://learn.freecodecamp.org/front-end-libraries/react/pass-props-to-a-stateless-functional-component
Tell us about your browser and operating system:
- Browser Name: Google Chrome
- Browser Version: Version 75.0.3770.100 (Official Build) (64-bit)
- Operating System: Windows 10
This is my first time opening an issue, I followed “Creating a New Github Issue” guide on freeCodeCamp forum. Please let me know if I am doing it wrong or there is a better approach, thank you.
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Pass Props to a Stateless Functional Component - JavaScript
Any one explain to me and give me a solution because i am pinned out from 2 hours. Regards, Ali Mosaad. My code...
Read more >React Pass Props to a Stateless Functional Component
I'd like to get the value from notificationCount to AuthLinks component, but as is a value from a variable seems that should be...
Read more >Pass Props to a Stateless Functional Component - React
In this React tutorial we -TITLE-. This video constitutes one part of many where I cover the FreeCodeCamp (www.freecodecamp.org) curriculum.
Read more >Passing Props to a Component - React Docs
Recap · To pass props, add them to the JSX, just like you would with HTML attributes. · To read props, use the...
Read more >React Interview Questions and Answers (2023) - InterviewBit
To pass data between such components, we pass props from a source component and keep passing the prop to the next component in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@Paul--- We are waiting for a PR to be reviewed/tested/merged and then master to be release to production before you will see the issue completely resolved.
The Solution is :