Please I need help with the meaning of 'stateless functional component' and why is "welcome"called as such?

Tell us what’s happening:

Your code so far


const CurrentDate = (props) => {
return (
  <div>
    { /* change code below this line */ }
    <p>The current date is: </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 />
      { /* change code above this line */ }
    </div>
  );
}
};

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 4.4.2; TECNO-A7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.116 Mobile Safari/537.36 EdgA/45.07.2.5059.

Challenge: Pass Props to a Stateless Functional Component

Link to the challenge:

1 - CurrentDate is a function,

const CurrentDate = () => {}

That’s why functioncomponent

Opposed to class components like Calendar, which is defined as a class.

2 - CurrentDate is not holding any internal values, referred as state in react, that’s whay is stateless.

So not having state and being a function is defined as a stateless function component

Hope this helps :slight_smile:

Thanks, I’m fine. You’re of help to me.