일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 태그된 유니온
- RTK Query
- tailwind
- CORS
- webpack
- 이분 검색
- map
- 공변성
- autosize
- ESlint
- 호이스팅
- 인터섹션
- TS
- 투포인터
- 리터럴 타입
- React
- app router
- 반공변성
- 무한 스크롤
- SSR
- Cypress
- recoil
- 타입 좁히기
- 결정 알고리즘
- Promise
- async/await
- Jest
- useAppDispatch
- CI/CD
- dfs
Archives
- Today
- Total
목록useIsMutating (1)
짧은코딩
React Query Loading 중앙화
React Query에서 데이터를 불러오는 올 때 isLoading을 중앙화할 수 있다. Loading 컴포넌트를 만든다. App.tsx에 Loading 컴포넌트를 넣어준다. Loading import { Spinner } from '@chakra-ui/react'; import { useIsFetching, useIsMutating } from 'react-query'; interface Props { isLoading?: boolean; } export default function Loading({ isLoading }: Props) { // useIsFetching은 현재 가져오고 있는 쿼리 호출의 정수 값을 리턴한다. const isFetching = useIsFetching(); // for ..
UpLog 릴리즈노트 프로젝트
2024. 2. 17. 18:15