Skip to content

Commit ad34cfc

Browse files
committed
fix: v4 문서 수정
1 parent e68e609 commit ad34cfc

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

document/v4.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
# 💻 React-query v4
1+
# 💻 TanStack Query(React Query v4)
22

33
![스크린샷 2022-08-17 오후 2 20 01](https://user-images.githubusercontent.com/64779472/185040681-2352e8c8-b2d7-40f7-893d-3ee2270904c9.png)
44

5-
- react-query v4가 정식 릴리즈되면서 v3와 비교해서 주요 변경사항 정리 문서입니다.
6-
- 추가 내용이 필요하신분은 언제든 `issue`, `pull request` 보내주시길 바랍니다.
7-
- [react-query v4 tanstack 공식 문서](https://tanstack.com/)
8-
- [react-query v4 migration 공식 문서](https://tanstack.com/query/v4/docs/guides/migrating-to-react-query-4)
5+
- TanStack Query(React Query v4)가 정식 릴리즈되면서 v3와 비교해서 주요 변경사항 정리 문서입니다.
6+
- [TanStack Query(React Query v4) 공식 문서](https://tanstack.com/)
7+
- [TanStack Query(React Query v4) migration 공식 문서](https://tanstack.com/query/v4/docs/guides/migrating-to-react-query-4)
98

109
<br />
1110

@@ -14,22 +13,27 @@
1413
### @tanstack/react-query
1514

1615
- v4부터 react-query에서 `@tanstack/react-query`로 패키지가 변경되었다. 따라서 설치와 import 할 때 주의해야 한다.
16+
1717
```bash
1818
$ npm i @tanstack/react-query
1919
# or
2020
pnpm add @tanstack/react-query
2121
# or
2222
yarn add @tanstack/react-query
2323
```
24+
2425
- 또한, Devtools는 별도의 패키지 설치가 필요하다.
26+
2527
```bash
2628
$ npm i @tanstack/react-query-devtools
2729
# or
2830
$ pnpm add @tanstack/react-query-devtools
2931
# or
3032
$ yarn add @tanstack/react-query-devtools
3133
```
34+
3235
- import 시, 다음과 같이 패키지명을 수정하면 된다.
36+
3337
```diff
3438
// v3
3539
- import { useQuery } from "react-query";
@@ -94,6 +98,8 @@ $ yarn add @tanstack/react-query-devtools
9498

9599
- [why-two-different-states](https://tanstack.com/query/v4/docs/react/guides/queries#why-two-different-states)
96100

101+
<br />
102+
97103
### useQueries
98104

99105
- v4부터 `useQueries`는 인자로 `queries` 프로퍼티를 가진 객체를 넘겨줄 수 있다.
@@ -115,6 +121,8 @@ useQueries({
115121
});
116122
```
117123

124+
<br />
125+
118126
### networkMode
119127

120128
- 기본적으로 react-query는 promise를 반환하는 모든 것에 사용할 수 있는 비동기 상태 관리 라이브러리이며, 이는 axios와 같은 data fetching 라이브러리와 가장 많이 사용되어진다.

0 commit comments

Comments
 (0)