r/learnreactjs • u/funkenpedro • Nov 05 '22
React Tutorial function components question
Hi, the following taken from the react site tutorial:
"In React, function components are a simpler way to write components that only contain a render method and don’t have their own state."
confuses me because the declaration of the functional component that follows:
function Square(props) {
return (
<button className="square" onClick={props.onClick}>
{props.value}
</button>
);
}
doesn't have a render method. Is the render method implied?
2
Upvotes
View all comments
Show parent comment
1
u/funkenpedro Nov 05 '22
thanks!