-
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
[FE] feat: 리뷰 좋아요 디바운스 적용 #377
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.
수고하셨습니다~~ 코멘트 읽어주세요~!
frontend/src/hooks/useDebounce.ts
Outdated
@@ -0,0 +1,35 @@ | |||
import { useCallback, useEffect, useRef } from 'react'; | |||
|
|||
// eslint-disable-next-line @typescript-eslint/ban-types |
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.
Function 타입을 쓸 수 없어서 임의로 했읍니다..
린트 설정에 추가할까요?
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(() => { | ||
return clear; | ||
}, []); |
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.
clear만 따로 useEffect 선언해주는 이유는 뭔가요??
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.
언마운트 될 때 타임아웃 클리어 하기 위해 작성했읍니다!
return clear; | ||
}, []); | ||
|
||
return [debounce, clear]; |
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.
쓰는 곳에서 자유롭게 이름을 수정하기 위해 작성했습니다
{debounce: debouncedToggleFavorite} 이 형태가 너무 길어질거 같아서요
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.
수고하셨슴다~!~!!!
Issue
✨ 구현한 기능
📢 논의하고 싶은 내용
🎸 기타
x
⏰ 일정