Skip to content

Instantly share code, notes, and snippets.

@iamsaief
Created August 22, 2020 15:05
Show Gist options
  • Save iamsaief/3f3efbe725934085efb8e4921f7940a4 to your computer and use it in GitHub Desktop.
Save iamsaief/3f3efbe725934085efb8e4921f7940a4 to your computer and use it in GitHub Desktop.
function App() {
const products = [
{ name: "Photoshop", price: "$4.00" },
{ name: "Figma", price: "$5.00" },
{ name: "Sketch", price: "$6.00" },
];
return (
<div>
<Products
name={products[0].name}
price={products[0].price}></Products>
<Products
name={products[1].name}
price={products[1].price}></Products>
</div>
);
}
function Products(props) {
return (
<div>
<h3>
Name: {props.name}, Price: {props.price}
</h3>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment