-
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- 서연진 #6
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.
굳굳 고생하셨습니당 👍
@@ -0,0 +1,16 @@ | |||
import { useState } from 'react'; | |||
|
|||
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.
음 아마 사용하는 곳에서
const {currentItem,changeItem} = useTabs();
요렇게 쓸 것 같은데 위처럼 아무것도 입력하지 않는 상황을 어떻게 방지할 수 있을까요
|
||
useEffect(() => { | ||
const timeout = setTimeout(() => setOpacity(1), delay * 1000); | ||
return () => clearTimeout(timeout); |
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.
요 클린업 함수가 왜 필요할까요!
@@ -0,0 +1,19 @@ | |||
import { useState, useEffect } from 'react'; | |||
|
|||
const 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.
const useDebounce = (value=1,delay=1000) => {
///
}
이런식으로 기본 값을 넣는 습관 들이는 게 좋습니당
|
||
|
||
function App() { | ||
const { currentItem, changeItem } = useTabs(0, hobbies); |
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: '얼마전에 동숲을 시작했습니다 너무너무 재밌네용', | ||
}, | ||
{ | ||
name: '산책', |
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
<!— 궁금한 점을 적어주세요(지우고 작성해주세요) —>
Reference
<!— 참고한 레퍼런스가 있다면 공유해 주세요(지우고 작성해주세요) —>