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