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
Every component has to return a value. We create a return( ) with JSX Markup. This is a special Markup Language made for React to write HTML alike in JS.
function Product() { return ( <div> <img src="https://i.imgur.com/MK3eW3As.jpg" alt="Katherine Johnson" /> </div> ); }