Answers for "how to render a jsx.element in functional component react"

1

functional components

function Welcome(props) {  return <h1>Hello, {props.name}</h1>;
}

const element = <Welcome name="Sara" />;ReactDOM.render(
  element,
  document.getElementById('root')
);
Posted by: Guest on March-31-2020

Code answers related to "how to render a jsx.element in functional component react"

Code answers related to "Javascript"

Browse Popular Code Answers by Language