In Parent.js
function Parent() {
return (
<>
<Child name={‘This is my name’}/>
</>
);
}
================================================================
In Child.js
function Child(props) {
return (
<>
<h1>props.name</h1>
</>
);
}
© www.thecoderjob.com. All Rights Reserved. Designed by HTML Codex