-
Notifications
You must be signed in to change notification settings - Fork 0
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
[ 7주차 기본과제 ] 🎈리액트 카드게임 TS 변환 및 Recoil 상태관리 #8
Open
yesongoget
wants to merge
32
commits into
main
Choose a base branch
from
week3_ts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✨ 구현 기능 명세
1️⃣ jsx → tsx 로 모두 변환해주세요!
jsx → tsx로 변환 ✔
2️⃣ recoil로 카드 게임에서 필요한 상태를 관리해주세요!
selectLevel (게임 난이도 선택) ✔
matchedCount (게임에서의 정답 수) ✔
isModalOpen (모달 오픈 여부) ✔
cardPairs (게임에서의 카드 짝 수) ✔
choiceOne, choiceTwo (사용자가 선택한 카드) ✔
🌼 PR Point
게임 로직에서 필요한 상태들을 모아둔 cardMatched,
레벨을 선택하는 상태를 정의한 gameLevel,
모달오픈상태를 정의한 modalOpen 총 3분류로 atom파일을 분리시켜주었습니다.
요로코롬~
그리고 여러 컴포넌트에서 자주 사용되는 카드 인터페이스를 따로 파일로 분리시켜 import 해줌으로써 중복을 최소화시켜줬습니다!
++ 자잘한 스타일에 변화를 줬어요!
헤더 색상 분리, 카드 가운데 정렬 등!
🥺 소요 시간, 어려웠던 점
10h
🌈 구현 결과물
week7.1.mp4