Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] setState 비동기동작 이슈 해결 #36

Open
2 tasks done
BoubleJ opened this issue Jun 4, 2024 · 0 comments
Open
2 tasks done

[Fix] setState 비동기동작 이슈 해결 #36

BoubleJ opened this issue Jun 4, 2024 · 0 comments
Assignees

Comments

@BoubleJ
Copy link
Contributor

BoubleJ commented Jun 4, 2024

ISSUE

React setState 함수의 비동기동작으로 인한 데이터 출력이 한 단계 밀리는 현상 해결

  • 변경된 state 값들을 한꺼번에 처리하는 리액트의 batching 시스템 때문에 setState 함수가 비동기적으로 운영되는 문제 발생
  • 달력 날짜 선택 시 바로 적용되지않고 이후 컴포넌트 렌더링 시 적용되는 문제

ESTIMATE

0.5 Day

TASKS

  • useEffect 내 setState 관련 로직 구현을 통해 해결
  • 적용된 날짜 state값을 Redux에 전역으로 보냄
@BoubleJ BoubleJ self-assigned this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant