useState의 비동기 문제

1.useState의 비동기 문제 - 원인

post-thumbnail

2.useState의 비동기 문제 - 함수형 업데이트

post-thumbnail

3.useState의 비동기 문제 - useRef

post-thumbnail