-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: online-game 모든 로직 비동기로 변경 #486
The head ref may contain hidden characters: "484-fix-online-game-\uBE44\uB3D9\uAE30-\uCC98\uB9AC"
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
비동기 로직 으로 변경하신 부분 잘 봤습니다 수고하셨습니다!
|
||
const init = () => { | ||
initMyInfo(); | ||
const init = async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분이 async 적용 부분이군요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
온라인 게임 웹소켓 처리 부분에서 비동기로 처리하신 것 확인했습니다.
해당 코드로 평가까지 달리겠습니다 |
✅ 풀_리퀘스트 체크리스트
🔄 변경 사항
비동기 함수인 getUserMe가 반환 된 이후에 전체 로직이 실행되어야 합니다.
기존 코드의 경우 getUserMe의 반환과 관계없이 이후 렌더링 로직이 실행되어 오류가 생겼습니다.
때문에 실행 시 콜스택에 들어가는 메인 로직을 전부 async함수 안으로 넣어 순서 보장하게 했습니다.
history 페이지로 넘길 때 웹소켓 연결 끊어줬습니다.
TODO, console.log 제거했습니다.
online-game bar width height 고정값이던거 서버기준으로 변경했습니다.
closes: #484