Initial Commit

This commit is contained in:
2026-09-16 17:22:14 +09:00
commit 858ee9e9da
335 changed files with 123898 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
# TanStack Query v5 참조
출처: https://tanstack.com/query/latest/docs/framework/react/guides/disabling-queries
확인일: 2026-09-11
## enabled와 초기 로딩
- `enabled: false`이고 캐시가 없으면 `status === "pending"`, `fetchStatus === "idle"`임.
- `isLoading``isPending && isFetching`이라 실제 첫 fetch 중일 때만 참임.
- 조건이 충족된 뒤 자동 fetch해야 하면 `enabled`에 조건을 넘김.
```tsx
const query = useQuery({
queryKey: ["todos", filter],
queryFn: () => fetchTodos(filter),
enabled: Boolean(filter),
})
```