Tell us what’s happening:
Describe your issue in detail here.
Hello, I’ve struggled a lot with this problem and found a solution but the condition - " The date
prop should be generated by calling Date()
".
The console says ’ The date prop should be generated by calling Date() (Test timed out)’. I’ve checked the solution and I’ve done everything exactly as it’s written there but the solution itself does not work too if I copypaste it in the code editor.
I’d love to receive your help, Thank you in advance.
**Your code so far**
const CurrentDate = (props) => {
return (
<div>
{ /* Change code below this line */ }
<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()}/>
{ /* Change code above this line */ }
</div>
);
}
};
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36
Challenge: Pass Props to a Stateless Functional Component
Link to the challenge: