1class MyComponent extends React.Component{
2 constructor(props){
3 super(props);
4 };
5 render(){
6 return(
7 <div>
8 <h1>
9 My First React Component!
10 </h1>
11 </div>
12 );
13 }
14};
15
1class Car extends React.Component {
2 render() {
3 return <h2>Hi, I am a Car!</h2>;
4 }
5}
6