-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4bc3e01
commit 35233dc
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
layout: post | ||
title: "[TIL] React Query로 인피니트스크롤링 구현방법 짧은요약" | ||
date: 2024-01-14 | ||
tags: [TIL] | ||
categories: | ||
- TIL | ||
comments: true | ||
--- | ||
|
||
# react-query | ||
|
||
## useInfiniteQuery | ||
|
||
useInfiniteQuery 훅을 사용하여 다음 데이터들을 불러올 수가 있다. | ||
|
||
참고: [useInfiniteQuery](https://tanstack.com/query/v4/docs/react/reference/useInfiniteQuery) | ||
|
||
# react-intersection-observer | ||
|
||
## useInView | ||
|
||
언제 업데이트 될 것인지를 정의해주는 훅스 | ||
|
||
어느 시점에서 useInView로 만든 컴포넌트가 보이면 그 순간 업데이트가 되도록 useEffect로 정의할 수 있다. | ||
|
||
참고: [react-intersection-observer](https://www.npmjs.com/package/react-intersection-observer) |