-
Notifications
You must be signed in to change notification settings - Fork 1
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
[3주차 기본/생각 과제] 🍚 점메추 🍚 #4
base: main
Are you sure you want to change the base?
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.
너무너무 수고했습니다👏👏👏 이번 뒤풀이 나와준 정우 최고최고 ><><
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.
나도 eslint 쓰고 싶ㄷr,,,,
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.
요거! 지워주는 게 좋지 않을까용??
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.
마자 필요없는건 지워두 됨~!
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.
얘두!!ㅎㅎ
- 좋은 상태 관리란 무엇일까? | ||
|
||
- 무분별하게 전역으로 상태를 관리하는 것은 좋지 않다. | ||
- 상태를 관리하는 코드는 그 상태와 연관된 컴포넌트와 최대한 가까이 배치되어야 한다.(응집성) |
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.
오 이거를 응집성이라고 하는 군아ㅎㅎㅎ
<React.Fragment> | ||
<Header /> | ||
<ContentSwapWrapper> | ||
{step === -1 ? ( |
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.
삼항 연산자를 이렇게 연결해서 써본 적이 없어서 처음 보고 조건 중첩문인 줄 ㅎㅎ,,,,
덕분에 중요한 거 알아갑니당ㅎㅎ
[ | ||
[ | ||
{ | ||
menu: "제육덮밥", |
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.
,,,,,,,,새벽에 보니까 배고프다
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.
상수값들 별도로 빼준 거 좋아요! 굳👍
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.
이거 진짜 난 왜 생각 못햇을가,,, 리팩 때 반영해봐여징,,
gap: 1rem; | ||
`; | ||
|
||
const BeforeButton = styled.button` |
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.
이거랑 밑에 NextButton 스타일드 컴포넌트가 똑같이 생긴 거 같은데?? 굳이 분리할 필요가 있을까~?
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 NextButtonWrapper = styled.div` |
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.
위의 코드 보니까 NextButtonWrapper
가 이전으로 버튼과 다음으로 버튼을 모두 감싸고 있던데 컴포넌트명을 다른 걸로 바꿔주는 게 어때?
font-weight: 600; | ||
`; | ||
|
||
const ResetButton = styled.button` |
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.
얘도 밑에 애들이랑 css가 똑같은 거 같은데??ㅎㅎㅎ
const Button으로 스타일드 컴포넌트 하나 만들어서 호옥시 변경 사항 생길 경우에 상속 받아서 쓰는 게 낫겠따 ㅎㅎ
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.
이번 주 과제도, 심심스 발표도,,코테 발표도,,,학교 팀플도,,,,화이탱,,,,,(+ 정우 살려)💪🏼
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + React</title> |
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.
나도 지금 이거 보고 생각났는데 title 안 바꿔줬다,,,!
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.
마자 필요없는건 지워두 됨~!
optionType={optionType} | ||
setStep={setStep} | ||
/> | ||
) : step === resultCombination.length ? ( |
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.
오오 이거 진짜 생각못해본 방법이다,,! 역시 새로워~
export default App; | ||
|
||
const ContentSwapWrapper = styled.div` | ||
height: calc(100vh - 4rem); |
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.
calc 잘 썼다-!!
flex-direction: column; | ||
align-items: center; | ||
|
||
width: 59.375rem; |
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.
아니 이 소숫점 세자리짜리 width는 어째서 계속 나오는겁니까아아ㅏㅇㄱ
gap: 1rem; | ||
`; | ||
|
||
const BeforeButton = styled.button` |
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.
그르게-! 하나로 합쳐줘도 될듯!
&:hover { | ||
border: 1.5px solid gray; | ||
|
||
cursor: pointer; |
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.
cursor: pointer 속성도 border: none 이랑 마찬가지로 모든 button 태그에 공통으로 적용하고 싶은거라면 GlobalStyle 로 빼줘도 될 듯~~
], | ||
[ | ||
{ | ||
menu: "짜장면", |
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.
난 짜장면,,,🤤
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.
이거 진짜 난 왜 생각 못햇을가,,, 리팩 때 반영해봐여징,,
import { defineConfig } from 'vite' | ||
import react from '@vitejs/plugin-react' | ||
|
||
// https://vitejs.dev/config/ |
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.
으앙 주석
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.
인데 config 파일이네 모지
✨ 구현 기능 명세
🌱 기본 조건
🧩 기본 과제
[취향대로 추천]
답변 선택
이전으로, 다음으로(결과보기) 버튼
아무것도 선택되지 않았을 시 버튼을 비활성화 시킵니다.
→ 눌러도 아무 동작 X
→ 비활성화일 때 스타일을 다르게 처리합니다.
이전으로
버튼을 누르면 이전 단계로 이동합니다.다음으로
/결과보기
버튼을 누르면 다음 단계로 이동합니다.버튼 호버시 스타일 변화가 있습니다.
결과
[ 랜덤 추천 ]
[ 공통 ]
다시하기
버튼→ 랜덤추천이면
랜덤 추천 start
화면으로, 취향대로 추천이면취향대로 추천 start
화면으로 돌아갑니다.→ 모든 선택 기록은 리셋됩니다.
🌠 심화 과제
theme + Globalstyle 적용
애니메이션
헤더
처음으로
버튼→ 추천 종류 선택 화면일시 해당 버튼이 보이지 않습니다.
→ 처음 추천 종류 선택 화면으로 돌아갑니다.
→ 모든 선택 기록은 리셋됩니다.
[ 취향대로 추천 ]
단계 노출
이전으로 버튼
useReducer
,useMemo
,useCallback
을 사용하여 로직 및 성능을 최적화합니다.생각과제
💎 PR Point
🥺 소요 시간, 어려웠던 점
8h
🌈 구현 결과물
2023-11-10.2.11.59.mov