react can i see fucnional and class componets code example
Example: functional components
function Welcome(props) { return Hello, {props.name}
;
}
const element = ;ReactDOM.render(
element,
document.getElementById('root')
);
function Welcome(props) { return Hello, {props.name}
;
}
const element = ;ReactDOM.render(
element,
document.getElementById('root')
);