minsung

Using Class type instead of Function type

1 -import React from 'react'; 1 +import React,{ Component } from 'react';
2 -import logo from './logo.svg';
3 import './App.css'; 2 import './App.css';
4 3
5 -function App() { 4 +class App extends Component {
5 + render(){
6 return ( 6 return (
7 <div className="App"> 7 <div className="App">
8 - <header className="App-header"> 8 + Hello, React!!
9 - <img src={logo} className="App-logo" alt="logo" />
10 - <p>
11 - Edit <code>src/App.js</code> and save to reload.
12 - </p>
13 - <a
14 - className="App-link"
15 - href="https://reactjs.org"
16 - target="_blank"
17 - rel="noopener noreferrer"
18 - >
19 - Learn React
20 - </a>
21 - </header>
22 </div> 9 </div>
23 - ); 10 + );
11 + }
24 } 12 }
25 13
14 +
26 export default App; 15 export default App;
......