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

feat: online-game 모든 로직 비동기로 변경 #486

Merged
merged 7 commits into from
Mar 12, 2024

Conversation

donghyun1998
Copy link
Contributor

@donghyun1998 donghyun1998 commented Mar 12, 2024


✅ 풀_리퀘스트 체크리스트

  • PR 제목: [feat/fix/refactor...] 작업 내용 한 줄 요약 (브랜치 이름) #이슈번호
  • commit message 가 적절한지 확인해주세요.
  • 적절한 branch 로 요청했는지 확인해주세요.
  • Assignees, Label 을 붙여주세요.
  • 주의 사항과 관련해 꼭 확인해야 할 사람이 있다면 Reviewer 로 등록해주세요.
  • PR이 승인된 경우 해당 브랜치는 삭제해 주세요!

🔄 변경 사항

  • 비동기 함수인 getUserMe가 반환 된 이후에 전체 로직이 실행되어야 합니다.
    기존 코드의 경우 getUserMe의 반환과 관계없이 이후 렌더링 로직이 실행되어 오류가 생겼습니다.
    때문에 실행 시 콜스택에 들어가는 메인 로직을 전부 async함수 안으로 넣어 순서 보장하게 했습니다.

  • history 페이지로 넘길 때 웹소켓 연결 끊어줬습니다.

  • TODO, console.log 제거했습니다.

  • online-game bar width height 고정값이던거 서버기준으로 변경했습니다.

closes: #484


@donghyun1998 donghyun1998 added enhancement New feature or request frontend frontend 관련 PR labels Mar 12, 2024
@donghyun1998 donghyun1998 self-assigned this Mar 12, 2024
@donghyun1998 donghyun1998 linked an issue Mar 12, 2024 that may be closed by this pull request
Copy link
Contributor

@bluedog129 bluedog129 left a 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 () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분이 async 적용 부분이군요

Copy link
Collaborator

@nyj001012 nyj001012 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

온라인 게임 웹소켓 처리 부분에서 비동기로 처리하신 것 확인했습니다.

@sejoonkimmm
Copy link
Contributor

해당 코드로 평가까지 달리겠습니다

@donghyun1998 donghyun1998 marked this pull request as draft March 12, 2024 10:54
@donghyun1998 donghyun1998 marked this pull request as ready for review March 12, 2024 11:23
@donghyun1998 donghyun1998 merged commit f28fce5 into main Mar 12, 2024
2 checks passed
@donghyun1998 donghyun1998 deleted the 484-fix-online-game-비동기-처리 branch March 12, 2024 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend frontend 관련 PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: online-game 비동기 처리
4 participants