-
Notifications
You must be signed in to change notification settings - Fork 11
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
12주차 Assignment - 박예은 #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.
굳굳...통과입니당 고생하셨어요! 💯
import { useState } from "react"; | ||
// useState 훅을 React로부터 불러와서 상태를 관리할 준비를 한다. | ||
|
||
export const useTabs = (initialTab, allTabs) => { |
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.
initalState가 undefined면 어떤 일이 일어날까요? (initalTab에 아무것도 안넣은 경우!)
const handler = setTimeout(() => { | ||
setDebouncedValue(value); | ||
}, delay); | ||
|
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.
요 클린업 함수가 왜 필요할까요!!!
box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1); | ||
`; | ||
|
||
export const StyledCalendar = styled(Calendar)` |
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파일을 만들어서 집어넣을 수도 있겠죠?!
아마 요렇게 css를 만들고
.react-calendar__tile {
font-size: 16px;
padding: 20px;
justify-content: center;
background: #ffffff;
border: none;
border-radius: 12px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.05);
transition: background-color 0.3s ease, box-shadow 0.3s ease;
&:hover {
background-color: #e1efff;
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
}
}
// 오늘 날짜
.react-calendar__tile--now {
background-color: #7db5f4;
color: #ffffff;
border-radius: 12px;
abbr {
padding: 5px 12px;
border-radius: 10px;
}
}
리액트 캘린더를 사용하는 쪽에서 이 css파일을 집어넣게 해도 좋을 것 같아요!
import { useFadeIn } from "./hooks/useFadeIn"; | ||
|
||
const hobbies = [ | ||
{ tab: "음악 듣기", content: "인디 음악 조아해요" }, |
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 [query, setQuery] = useState(""); | ||
const debouncedQuery = useDebounce(query, 300); | ||
|
||
const filteredHobbies = useMemo(() => { |
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.
요기 useMemo를 걸어주신 이유가 있을까욜
margin-bottom: 20px; | ||
`; | ||
|
||
const Button = 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.
굳굳 👍
import moment from "moment"; | ||
|
||
const Calendar = () => { | ||
const [value, onChange] = useState(new Date()); |
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 [value,onChange] = useState(() => new Date());
위 코드와 어떤 차이가 있을까욜
Description
Important content
Question
Reference