https://tanstack.com/query/v4/docs/react/overview
Overview | TanStack Query Docs
TanStack Query (FKA React Query) is often described as the missing data-fetching library for web applications, but in more technical terms, it makes fetching, caching, synchronizing and updating server state in your web applications a breeze. Motivation
tanstack.com
rect-query과 tanstack query로 이름이 바뀌었다고 한다. 그리하여 프로젝트에 사용도해보면서 공식문서도 같이 보면서 공부하고 기록해나갈려고 한다.
tanstack query
- 데이터 fetching,caching,synchronizing,updating,server state에 사용
- 별도의 config파일을 작성할 필요가 없으며 쉽게 커스터마이징이 가능
isLoading vs isFetching
isFetching
isFetching은 어떠한 react-query 요청 내부의 비동기 함수가 처리되었는지 여부에 따라 true/false로 나누어 진다.
isLoading
isLoading은 캐시된 데이터가 없으며, 처음 실행된 쿼리 일 때 로딩 여부에 따라 true/false로 나누어 진다.
그리하여 후에 페이지네이션을 할때 둘의 차이를 알아야 명확하게 실행할 수 있다.