Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Spring
- npm에러
- app:compiledebugkotlin
- async
- set
- mainapplication.kt
- 안드로이드빌드에러
- 상속
- 리액트네이티브아이콘
- 이진탐색
- 배열중복요소제거
- reactnative
- reactnative error
- 타입스크립트
- app.post
- array
- forwardref type
- javascript
- 슬라이딩윈도우
- map
- 스크롤이벤트
- interface
- materialicons
- generic
- err_connection_refused
- Next.js
- extends
- Filter
- TS
- react
Archives
- Today
- Total
목록ajax retry (1)
rhanziy
React - 실시간 데이터 전송이 필요할 때 react-query 라이브러리
오늘은 react-query 라이브러리를 설치했다. 더보기 서버 상태를 관리해주는 react-query 라이브러리 장점 1. 성공/실패/로딩 중 쉽게 파악 가능 2. 틈만나면 refetch 해줌 3. 실패 시 retry 해줌 4. state 공유 안해도 된다.(ajax코드 다시 쓰면 됨) 5. ajax 결과 캐싱 가능 => 실시간 데이터 전송이 필요한 페이지에서 주로 쓰인다. ( ex. 코인거래소) 사용법을 알아보자. 터미널 오픈 후 npm install react-query 그리고 index.js에서 설정해줘야 할 몇가지. import { QueryClient, QueryClientProvider } from 'react-query'; const queryClient = new QueryClient()..
React
2022. 12. 6. 15:52