i have this code so far and trying to use ES6 syntax to create buttons onto webpage
import React from 'react';
import ReactDOM from 'react-dom';
class CustomButton extends React.Component {
render() {
return <button>{this.props.text}</button>
};
};
class Element extends React.Component {
render() {
return (
<div>
<CustomButton text="I" />
<CustomButton text="know" />
<CustomButton text="React!" />
</div>
);
};
};
ReactDOM.render(
Element,
document.querySelector('#root')
);
however nothing is being created on the web page.