React component는 Class 형식으로도 사용할 수 있다. (최신 버전에서는 function 형태를 권장한다고 함) class ClassName extends Component { // constructor와 constructor 내 super() 호출, render()는 필수 constructor(props) { // props를 선언 super(props); this.state = {// state 선언. let [state1] = useState(...) state1 : ..., state2 : ... } } render() { return ( ... ... this.setState({ state1 : ... }); // state 변경 setState(...) ) } }