Skip to content

Instantly share code, notes, and snippets.

@robzlabz
Created January 7, 2021 05:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robzlabz/08e646cf7cd4d034c30e2b82df308f96 to your computer and use it in GitHub Desktop.
Save robzlabz/08e646cf7cd4d034c30e2b82df308f96 to your computer and use it in GitHub Desktop.
// Pemanggilan
<Card name="Agus"/>
const Card = (props) => {
return <h1>Hai, {props.name}</h1>;
};
// atau bisa di pecah langsung menggunakan object desctructure
// jadi kita bisa langsung memanggil 'name' tanpa variable props
const Card = ({ name }) => {
return <h1>Hai, {name}</h1>;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment