본문 바로가기

개발자 메론빵

검색하기
개발자 메론빵
프로필사진 ddiae

웹/앱 개발 및 수업합니다! 문의는 visveryver2@gmail.com


  • 분류 전체보기 (18)
    • FrontEnd (2)
    • React (5)
    • JavaScript (0)
    • TypeScript (2)
    • WebRTC (4)
    • CSS (1)
    • Dev (2)
    • 수업 (2)
Guestbook
Recent Posts
Tags
  • Viewport
  • LVH
  • readonly
  • webrtc
  • mock-service-worker
  • mutationoptions
  • MSW
  • fsd-architecture
  • queryoptions
  • React
  • queryfactory
  • SDP
  • Vite
  • HTTP
  • dvh
  • useTransition
  • startTransition
  • fsd
  • type-challenges
  • Mapped type
  • vh
  • websocket
  • tanstack-router
  • msw2.0
  • react-hook
  • tanstack-query
  • type-challenges-easy
  • Typescript
  • webrtc #ice #stun #turn
  • svh
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록tanstack-query (1)

개발자 메론빵

[TanStack Query] QueryFactory로 API 관리하기

FSD 구조를 사용할 때 TanStack Query를 더 효율적으로 사용하기 위해 QueryFactory 형식으로 API요청 관리해주면 좋다는 FSD 공식문서 내용을 보고 queryFactory를 적용 해보기로 한다. qeuryFactory는 queryOptions로 구성한다.📌queryOptionsqueryKey와 queryFn을 재설정 없이 공유하기 위해 queryOptions를 사용할 수 있다. 한 곳에서 공통 옵션을 정의해주어 반복 설정해주지 않아도 된다는 이점이 있다.const getLearnerStatus = (learnerId: string) => queryOptions({ queryKey: ['learnerStatus', learnerId], queryFn:..

React 2024. 8. 16. 16:54
이전 Prev 1 Next 다음

Blog is powered by AXZ / Designed by Tistory

티스토리툴바