class Button extends React.Component { constructor() { super(); this.state = { count: 0, }; } updateCount() { this.setState((prevState, props) => { return { count: prevState.count + 1 } }); } render() { return (<button => this.updateCount()} > Clicked {this.state.count} times </button>); } }



저거두개 의미가 뭔지 모르겠음..


책에있는게 구버전인지 달라서 설명이 부족해