Skip to content
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

PR 피드백 반영 #7

Open
2scent opened this issue Feb 5, 2025 · 0 comments
Open

PR 피드백 반영 #7

2scent opened this issue Feb 5, 2025 · 0 comments
Assignees

Comments

@2scent
Copy link
Collaborator

2scent commented Feb 5, 2025

#6 피드백 반영

  • API와 가장 가까운 곳에서 프론트엔드에 맞는 인터페이스로 데이터를 변환해서 리턴하기
    • 타입은 프론트엔드에서 사용할 것만 export 하기
  • 에러 핸들링. ErrorBoundary와 Suspense를 같이 처리하는 AsyncBoundary 패턴 적용
    • 프론트엔드에 맞는 에러 메세지로 가공하는 건 queryFn에서 throw 하거나 컴포넌트 쪽에서 code에 따라 텍스트로 매핑해주는 방법 등이 있음
  • 복잡한 훅은 커스텀 훅으로 분리하고, 필요한 인터페이스만 노출
  • 무한 스크롤은 컴포넌트를 활용해서 선언적으로 처리하기
  • searchParams 동기화 로직 다시 보기
  • 디바운스는 handleChange(정확히는 setSearchTerm)이 되도록, 입력은 Uncontrolled Component로
  • 탭에 new, bestseller가 아닌 기대하지 않은 값이 들어왔을 때 new로 변환하기
@2scent 2scent self-assigned this Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant