So, in your function above, you have a parameter, date - but is that what your component will get? It receives an object, which is often referred to (by convention) as props. In this case, if you had used the convention, you could do:
// suppose I'd had `<Nametag myName="Clark Kent" />`
const Nametag = (props) => {
return (
<div> <p>My name is: {props.myName}</p> </div>
);
};
or, if I wanted to be able to deconstruct my property by name:
// suppose I'd had `<Nametag myName="Clark Kent" />`
// Here, I use object deconstruction to get the one prop I want
const Nametag = ({myName}) => {
return (
<div> <p>My name is: {myName}</p> </div>
);
};