import React from 'react'
import ReactDOM from 'react-dom'
class Hello extends React.Component {
render () {
return <div className='message-box'>
Hello {this.props.name}
</div>
}
}
// New component class starts here:
class Friend extends React.Component {
render() {
const friend = friends[0];
return (
<div>
<h1>{friend.title}</h1>
<img src={friend.src}/>
</div>
);
}
}
class ExampleComponent extends React.Component {
constructor(props) {
super(props);
this.state = { };
}
render() {
return (
<div>
<h1>This is a view created by a class component</h1>
</div>
);
}
}