const [stats, setState] = React.useState(0);
const onClick = () => {
setState((current) => current + changeValue)
}
<div>
<h1>Super Converterr</h1>
<label for="minutes">Minutes</label>
<input type="number" placeholder="Minutes" id="minutes"/>
<br />
<label for="hours">Hours</label>
<input type="number" placeholder="Hours" id="hours"/>
</div>
JSX에서는 위와 같이 label 안에 for을 쓰지 않는다.
for은 Javascript용어에 해당하기 때문이다. (이미 선점된 단어에 해당한다)
그렇다면 label 내의 for는 어떻게사용해야 할까? 바로 htmlFor로 변경해줘야한다.
class의 경우에는 className으로 작성한다.