1. class를 사용한 리액트
class Subject extends Component {
  render() {
    return (
      <header> 
        <h1>WEB</h1>
        World wide web!
      </header>
    )
  }
}
  1. 컴포넌트
function App(){
  return (
    <div>
      <Profile />
    </div>
  )
}

class Profile extends React.Component {
  constructor(){
    super();
  }

  render(){
    return (
      <div>프로필영역입니다</div>
    )
  }
}
  1. class를 만들고 이름 짓는다.
  2. React.Componentextends한다고 써준다.
  3. constructor(){} 함수를 적어준다.
  4. render(){} 함수 안에 원하는 HTML을 적는다.
  5. <Profile />을 원하는 곳에 첨부한다.
  1. State
constructor(props) {
    super(props);
    this.state={
      subject:{title:'WEB', sub:'World!wide Web'}
   }
}