how props work!

PHOTO EMBED

Fri May 27 2022 16:58:31 GMT+0000 (UTC)

Saved by @clay #undefined

function Welcome(props) {

  return <h1>Hello, {props.name}</h1>;

}

​

const root = ReactDOM.createRoot(document.getElementById('root'));

const element = <Welcome name="Sara" />;

root.render(element);
content_copyCOPY

https://codepen.io/gaearon/pen/YGYmEG?editors