This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsafe-perm=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Square(props) { // The properties of the square contain the "onClick" function as well as the "value" number | |
return ( | |
<button className="square" | |
onClick={props.onClick}>{/** (1) When I click on the button, it triggers the function onClick from the props object. */} | |
{props.value} | |
</button> | |
); | |
} |
NewerOlder