Dies ist eine alte Version des Dokuments!
LU01a - Creating a component
Define the function
With function Product() { } you define a JavaScript function with the name Product. This is also going to be our components name
function Product() { }
Return markup
Each component must return a value. We create a return() using JSX markup. This is a special markup language made for React that allows HTML to be written in JS as well.
function Product() { return ( <div> <img src="https://placehold.it/800" alt="Product Image" /> </div> ); }