how to create a component using react.createElement code example
Example 1: React.createElement
const e = React.createElement;
ReactDOM.render(
e('div', null, 'Hello World'),
document.getElementById('root')
);
Example 2: react createelement
class Greeting extends React.Component {
render() {
return <h1>Hello, {this.props.name}</h1>;
}
}