Learn the fundamentals of React, including simple and class components, state, props, and submitting form data.
Composing Components
<div id="root"></div> |
function Welcome(props) { | |
return <h1>Hello, {props.name}</h1>; | |
} | |
function App(){ | |
return ( | |
<div> | |
<Welcome name="Sara"/> | |
<Welcome name="Cahal"/> | |
<Welcome name="Edite"/> | |
</div> | |
); | |
} | |
ReactDOM.render( | |
<App />, | |
document.getElementById("root") | |
); |
<script src="https://unpkg.com/react/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom/umd/react-dom.development.js"></script> |