-
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 - 양라윤 #2
base: main
Are you sure you want to change the base?
Conversation
setDebouncedValue(value); | ||
}, delay); | ||
|
||
return () => { |
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.
요렇게 useEffect에서 함수를 반환하는 이유가 무엇일까요?!
tab: "music is 마랖...", | ||
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.
????????????????
]; | ||
|
||
function App() { | ||
const { currentItem, changeItem } = useTabs(0, 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 { currentItem, changeItem } = useTabs(0, content); | ||
const fadeInContent = useFadeIn(1, 2); | ||
|
||
const [query, setQuery] = useState(""); |
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.
보통 컴포넌트는 UI를 그린다<-요 역할만 하도록 최대한 역할과 책임을 분리하는 게 좋아요!
그래서 복잡한 로직이나 계산들을 커스텀 훅으로 뺴곤 한답니당..!
만약 이 친구들을 ㅌ커스텀훅으로 뺀다면 어떻게 만들 수 있을까용
<div> | ||
<h1>취미 소개 페이지</h1> | ||
<Search | ||
type="text" |
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.
기본값이 text라 안넣어도 될것 같아욜
/> | ||
<p>{apiResult}</p> | ||
{content.map((section, index) => ( | ||
<BtnSt onClick={() => changeItem(index)}>{section.tab}</BtnSt> |
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 const StyledCalendar = styled(Calendar)` | ||
width: 100%; |
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 calendar와 엮인 클래스 이름을 요기서 선언하기 보단 따로 CSS파일을 만드는 게 더 좋을 것 같아요
@@ -0,0 +1,19 @@ | |||
import { useState, useEffect } from "react"; | |||
|
|||
function useDebounce(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.
요기 아무런 값이 안넣어지면 어떤 일이 일어날까욜
Description
Important content
Question