@@ -3,11 +3,11 @@ sidebar_position: 10
33---
44# React Query์ ํจ๊ป ์ฌ์ฉํ๊ธฐ
55
6- ## โํค๋ฅผ ์ด๋์ ๋์ด์ผ ํ๋๊ฐโ ๋ฌธ์
6+ ## "Query Key ๋ฐฐ์น" ๋ฌธ์
77
8- ### ํด๊ฒฐ์ฑ
โ ์ํฐํฐ๋ณ๋ก ๋ถ๋ฆฌํ๊ธฐ
8+ ### ํด๊ฒฐ์ฑ
โ entities๋ณ๋ก ๋ถ๋ฆฌํ๊ธฐ
99
10- ํ๋ก์ ํธ๊ฐ ์ด๋ฏธ ์ํฐํฐ ๋จ์๋ก ๊ตฌ์ฑ๋์ด ์์ผ๋ฉฐ, ๊ฐ ์์ฒญ์ด ๋จ์ผ ์ํฐํฐ์ ํด๋นํ๋ค๋ฉด, ์ํฐํฐ๋ณ๋ก ์ฝ๋๋ฅผ ๊ตฌ์ฑํ๋ ๊ฒ์ด ์ข์ต๋๋ค. ์๋ฅผ ๋ค์ด, ๋ค์๊ณผ ๊ฐ์ ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค:
10+ ํ๋ก์ ํธ๊ฐ ์ด๋ฏธ entities ๋จ์๋ก ๊ตฌ์ฑ๋์ด ์์ผ๋ฉฐ, ๊ฐ ์์ฒญ์ด ๋จ์ผ entity์ ํด๋นํ๋ค๋ฉด, entities๋ณ๋ก ์ฝ๋๋ฅผ ๋ถ๋ฆฌํ๋ ๊ฒ์ด ์ข์ต๋๋ค. ์๋ฅผ ๋ค์ด, ๋ค์๊ณผ ๊ฐ์ ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค:
1111
1212``` sh
1313โโโ src/ #
@@ -18,11 +18,11 @@ sidebar_position: 10
1818 โโโ entities/ #
1919 | โโโ {entity}/ #
2020 | ... โโโ api/ #
21- | โโโ ` {entity}.query` # ์ฟผ๋ฆฌ ํค์ ํจ์
22- | โโโ ` get-{entity}` # ์ํฐํฐ ์กฐํ ํจ์
23- | โโโ ` create-{entity}` # ์ํฐํฐ ์์ฑ ํจ์
24- | โโโ ` update-{entity}` # ์ํฐํฐ ์
๋ฐ์ดํธ ํจ์
25- | โโโ ` delete-{entity}` # ์ํฐํฐ ์ญ์ ํจ์
21+ | โโโ ` {entity}.query` # Query Keys์ Query Functions
22+ | โโโ ` get-{entity}` # entity fetch ํจ์
23+ | โโโ ` create-{entity}` # entity create ํจ์
24+ | โโโ ` update-{entity}` # entity update ํจ์
25+ | โโโ ` delete-{entity}` # entity delete ํจ์
2626 | ... #
2727 | #
2828 โโโ features/ #
@@ -33,18 +33,18 @@ sidebar_position: 10
3333 ... #
3434```
3535
36- ๋ง์ฝ ์ํฐํฐ ๊ฐ์ ์ฐ๊ฒฐ์ด ํ์ํ ๊ฒฝ์ฐ (์: Country ์ํฐํฐ์ City ์ํฐํฐ ํ๋๊ฐ ํฌํจ๋๋ ๊ฒฝ์ฐ), [ ๊ต์ฐจ ๊ฐ์ ธ์ค๊ธฐ๋ฅผ ์ํ ๊ณต๊ฐ API] [ public-api-for-cross-imports ] ์ ์ฌ์ฉํ๊ฑฐ๋ ๋์์ผ๋ก ์๋์ ๊ตฌ์กฐ๋ฅผ ๊ณ ๋ คํ ์ ์์ต๋๋ค.
36+ ๋ง์ฝ entities ๊ฐ์ ๊ด๊ณ๊ฐ ํ์ํ ๊ฒฝ์ฐ(์: Country ์ํฐํฐ๊ฐ City ์ํฐํฐ์ ํ๋๋ฅผ ํฌํจํ๋ ๊ฒฝ์ฐ), [ ๊ต์ฐจ ๊ฐ์ ธ์ค๊ธฐ๋ฅผ ์ํ Public API] [ public-api-for-cross-imports ] ๋ฅผ ํ์ฉํ๊ฑฐ๋, ์๋์ ๊ฐ์ ๋์ฒด ๊ตฌ์กฐ๋ฅผ ๊ณ ๋ คํ ์ ์์ต๋๋ค.
3737
38- ### ๋์ ๋ฐฉ์ โ shared์ ์ ์งํ๊ธฐ
38+ ### ๋์ ๋ฐฉ์ โ shared์ ์ ์ฅํ๊ธฐ
3939
40- ์ํฐํฐ๋ณ ๋ถ๋ฆฌ๊ฐ ์ ์ ํ์ง ์์ ๊ฒฝ์ฐ, ๋ค์๊ณผ ๊ฐ์ ๊ตฌ์กฐ๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค:
40+ entities๋ณ ๋ถ๋ฆฌ๊ฐ ์ ์ ํ์ง ์์ ๊ฒฝ์ฐ, ๋ค์๊ณผ ๊ฐ์ ๊ตฌ์กฐ๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค:
4141
4242``` sh
4343โโโ src/ #
4444 ... #
4545 โโโ shared/ #
4646 โโโ api/ #
47- ... โโโ ` queries` # ์ฟผ๋ฆฌ ํฉํ ๋ฆฌ๋ค
47+ ... โโโ ` queries` # Query Factories
4848 | โโโ ` document.ts` #
4949 | โโโ ` background-jobs.ts` #
5050 | ... #
@@ -57,9 +57,9 @@ sidebar_position: 10
5757export { documentQueries } from " ./queries/document" ;
5858```
5959
60- ## "mutation ์์น ์ค์ " ๋ฌธ์
60+ ## "Mutation ์์น ์ค์ " ๋ฌธ์
6161
62- ์ฟผ๋ฆฌ์ mutation์ ๊ฐ์ ์์น์ ๋๋ ๊ฒ์ ๊ถ์ฅ๋์ง ์์ต๋๋ค. ๋ค์ ๋ ๊ฐ์ง ์ต์
์ด ์์ต๋๋ค:
62+ Query์ Mutation์ ๊ฐ์ ์์น์ ๋๋ ๊ฒ์ ๊ถ์ฅ๋์ง ์์ต๋๋ค. ๋ค์ ๋ ๊ฐ์ง ์ต์
์ด ์์ต๋๋ค:
6363
6464### 1. ์ฌ์ฉ ์์น ๊ทผ์ฒ์ ` api ` ๋๋ ํ ๋ฆฌ์์ ์ปค์คํ
ํ
์ ์ํ๊ธฐ
6565
@@ -80,7 +80,7 @@ export const useUpdateTitle = () => {
8080};
8181```
8282
83- ### 2. ๊ณต์ฉ ๋๋ ์ํฐํฐ์์ mutation ํจ์๋ฅผ ์ ์ํ๊ณ , ์ปดํฌ๋ํธ์์ ` useMutation ` ์ ์ง์ ์ฌ์ฉํ๊ธฐ
83+ ### 2. ๊ณต์ฉ ๋๋ entities์์ mutation ํจ์๋ฅผ ์ ์ํ๊ณ , ์ปดํฌ๋ํธ์์ ` useMutation ` ์ ์ง์ ์ฌ์ฉํ๊ธฐ
8484
8585``` tsx
8686const { mutateAsync, isPending } = useMutation ({
@@ -115,11 +115,13 @@ export const CreatePost = () => {
115115};
116116```
117117
118- ## ์์ฒญ์ ์กฐ์งํ
118+ ## Request ์กฐ์งํ
119119
120- ### ์ฟผ๋ฆฌ ํฉํ ๋ฆฌ
120+ ### Query Factory
121121
122- ์ฟผ๋ฆฌ ํฉํ ๋ฆฌ๋ ์ฟผ๋ฆฌ ํค ๋ชฉ๋ก์ ๋ฐํํ๋ ํจ์๋ฅผ ํฌํจํ ๊ฐ์ฒด์
๋๋ค. ์ฌ์ฉ ๋ฐฉ๋ฒ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
122+ Query Factory๋ Query Key ๋ชฉ๋ก์ ๋ฐํํ๋ ํจ์๋ฅผ ํฌํจํ ๊ฐ์ฒด์
๋๋ค.
123+
124+ ์ฌ์ฉ ๋ฐฉ๋ฒ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
123125
124126``` ts
125127const keyFactory = {
@@ -129,7 +131,7 @@ const keyFactory = {
129131```
130132
131133:::info
132- ` queryOptions ` ๋ react-query@v5์ ๋ด์ฅ ์ ํธ๋ฆฌํฐ์
๋๋ค (์ ํ ์ฌํญ)
134+ ` queryOptions ` ๋ TanStack Query v5์์ ์ ๊ณตํ๋ ๋ด์ฅ ์ ํธ๋ฆฌํฐ๋ก, ์ ํ์ ์ผ๋ก ์ฌ์ฉํ ์ ์์ต๋๋ค.
133135
134136``` ts
135137queryOptions ({
@@ -138,11 +140,11 @@ queryOptions({
138140});
139141```
140142
141- ๋ ํฐ ํ์
์์ ์ฑ, react-query์ ํฅํ ๋ฒ์ ๊ณผ์ ํธํ์ฑ, ํจ์ ๋ฐ ์ฟผ๋ฆฌ ํค์ ๋ํ ์ฌ์ด ์ก์ธ์ค๋ฅผ ์ํด, "@tanstack/react-query "์ ๋ด์ฅ queryOptions ํจ์๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค [ (์์ธํ ๋ด์ฉ์ ์ฌ๊ธฐ)] ( https://tkdodo.eu/blog/the-query-options-api#queryoptions ) .
143+ ๋ ์๊ฒฉํ ํ์
, TanStack Query์ ํฅํ ๋ฒ์ ๊ณผ์ ํธํ์ฑ, Query Function ๋ฐ Query Key์ ๋ํ ์ฌ์ด ์ก์ธ์ค๋ฅผ ์ํด, "@tanstack/react-query "์ ๋ด์ฅ queryOptions ํจ์๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค [ (์์ธํ ๋ด์ฉ์ ์ฌ๊ธฐ)] ( https://tkdodo.eu/blog/the-query-options-api#queryoptions ) .
142144
143145:::
144146
145- ### 1. ์ฟผ๋ฆฌ ํฉํ ๋ฆฌ ์์ฑ ์์
147+ ### 1. Query Factory ์์ฑ ์์
146148
147149``` tsx title="@/entities/post/api/post.queries.ts"
148150import { keepPreviousData , queryOptions } from " @tanstack/react-query" ;
@@ -171,7 +173,7 @@ export const postQueries = {
171173};
172174```
173175
174- ### 2. ์ ํ๋ฆฌ์ผ์ด์
์ฝ๋์์์ ์ฟผ๋ฆฌ ํฉํ ๋ฆฌ ์ฌ์ฉ ์์
176+ ### 2. ์ ํ๋ฆฌ์ผ์ด์
์ฝ๋์์์ Query Factory ์ฌ์ฉ ์์
175177``` tsx
176178import { useParams } from " react-router-dom" ;
177179import { postApi } from " @/entities/post" ;
@@ -214,16 +216,17 @@ export const PostPage = () => {
214216};
215217```
216218
217- ### ์ฟผ๋ฆฌ ํฉํ ๋ฆฌ ์ฌ์ฉ์ ์ฅ์
218- - ** ์์ฒญ ๊ตฌ์กฐํ** : ํฉํ ๋ฆฌ๋ฅผ ํตํด ๋ชจ๋ API ์์ฒญ์ ํ ๊ณณ์ ์กฐ์งํํ์ฌ ์ฝ๋์ ๊ฐ๋
์ฑ๊ณผ ์ ์ง๋ณด์์ฑ์ ๋์
๋๋ค.
219- - ** ์ฟผ๋ฆฌ ๋ฐ ํค์ ๋ํ ํธ๋ฆฌํ ์ ๊ทผ** : ๋ค์ํ ์ ํ์ ์ฟผ๋ฆฌ์ ํด๋น ํค์ ์ฝ๊ฒ ์ ๊ทผํ ์ ์๋ ๋ฉ์๋๋ฅผ ์ ๊ณตํฉ๋๋ค.
220- - ** ์ฟผ๋ฆฌ ์ฌํธ์ถ ์ฉ์ด์ฑ** : ์ ํ๋ฆฌ์ผ์ด์
์ ์ฌ๋ฌ ๋ถ๋ถ์์ ์ฟผ๋ฆฌ ํค๋ฅผ ๋ณ๊ฒฝํ ํ์ ์์ด ์ฝ๊ฒ ์ฌํธ์ถํ ์ ์์ต๋๋ค.
219+ ### Query Factory ์ฌ์ฉ์ ์ฅ์
220+ - ** Request ๊ตฌ์กฐํ** : ๋ชจ๋ API ์์ฒญ์ Factory ํจํด์ผ๋ก ๊ด๋ฆฌํ์ฌ ์ฝ๋์ ๊ฐ๋
์ฑ๊ณผ ์ ์ง๋ณด์์ฑ์ ํฅ์์ํต๋๋ค.
221+ - ** Query์ Key์ ๋ํ ํธ๋ฆฌํ ์ ๊ทผ** : ๋ค์ํ Query ์ ํ๊ณผ ํด๋น Key๋ฅผ ์์ฝ๊ฒ ์กฐํํ ์ ์๋ ๋ฉ์๋๋ฅผ ์ ๊ณตํฉ๋๋ค.
222+ - ** Query Invalidation ์ฉ์ด์ฑ** : ์ ํ๋ฆฌ์ผ์ด์
์ ์ ๋ฐ์์ Query Key๋ฅผ ๋ณ๊ฒฝํ ํ์ ์์ด ์ฝ๊ฒ Invalidateํ ์ ์์ต๋๋ค.
223+
224+ ## Pagination
221225
222- ## ํ์ด์ง๋ค์ด์
223- ์ด ์น์
์์๋ ํ์ด์ง๋ค์ด์
์ ์ฌ์ฉํ์ฌ ๊ฒ์๋ฌผ ์ํฐํฐ๋ฅผ ๊ฐ์ ธ์ค๋ API ์์ฒญ์ ์ํํ๋ ` getPosts ` ํจ์์ ์๋ฅผ ์๊ฐํฉ๋๋ค.
226+ ์ด ์น์
์์๋ Pagination์ ํ์ฉํ์ฌ ` getPosts ` ํจ์๋ฅผ ํตํด ๊ฒ์๋ฌผ entity๋ฅผ ๊ฐ์ ธ์ค๋ API ์์ฒญ์ ์ํํ๋ ๋ฐฉ๋ฒ์ ์๊ฐํฉ๋๋ค.
224227
225228### 1. ` getPosts ` ํจ์ ์์ฑํ๊ธฐ
226- getPosts ํจ์๋ ` api ` ์ธ๊ทธ๋จผํธ์ ` get-posts.ts ` ํ์ผ์ ์์ต๋๋ค .
229+ getPosts ํจ์๋ ` api ` segments์ ` get-posts.ts ` ํ์ผ์์ ์ ์๋ฉ๋๋ค .
227230
228231``` tsx title="@/pages/post-feed/api/get-posts.ts"
229232import { apiClient } from " @/shared/api/base" ;
@@ -254,8 +257,9 @@ export const getPosts = async (
254257};
255258```
256259
257- ### 2. ํ์ด์ง๋ค์ด์
์ ์ํ ์ฟผ๋ฆฌ ํฉํ ๋ฆฌ
258- ` postQueries ` ์ฟผ๋ฆฌ ํฉํ ๋ฆฌ๋ ํน์ ํ์ด์ง์ ์ ํ์ ๋ง์ถฐ ๊ฒ์๋ฌผ ๋ชฉ๋ก์ ์์ฒญํ๋ ๋ฑ ๊ฒ์๋ฌผ ๊ด๋ จ ๋ค์ํ ์ฟผ๋ฆฌ ์ต์
์ ์ ์ํฉ๋๋ค.
260+ ### 2. Pagination์ ์ํ Query Factory
261+
262+ ` postQueries ` Query Factory๋ ํน์ ํ์ด์ง์ ์ ํ์ ๋ง์ถฐ ๊ฒ์๋ฌผ ๋ชฉ๋ก์ ์์ฒญํ๋ ๋ฑ, ๊ฒ์๋ฌผ ๊ด๋ จ ๋ค์ํ Query Options์ ์ ์ํฉ๋๋ค.
259263
260264``` tsx
261265import { keepPreviousData , queryOptions } from " @tanstack/react-query" ;
@@ -301,11 +305,12 @@ export const HomePage = () => {
301305์์๋ ๋จ์ํ๋ ๋ฒ์ ์ด๋ฉฐ, ์ ์ฒด ์ฝ๋๋ [ GitHub] ( https://github.com/ruslan4432013/fsd-react-query-example ) ์์ ํ์ธํ ์ ์์ต๋๋ค.
302306:::
303307
304- ## ์ฟผ๋ฆฌ ๊ด๋ฆฌ๋ฅผ ์ํ ` QueryProvider `
305- ์ด ๊ฐ์ด๋์์๋ ` QueryProvider ` ๋ฅผ ์ด๋ป๊ฒ ๊ตฌ์ฑํ๋์ง ์ดํด๋ด
๋๋ค.
308+ ## Query ๊ด๋ฆฌ๋ฅผ ์ํ ` QueryProvider `
309+
310+ ์ด ๊ฐ์ด๋์์๋ ` QueryProvider ` ์ ๊ตฌ์ฑ ๋ฐฉ๋ฒ์ ์ค๋ช
ํฉ๋๋ค.
306311
307312### 1. ` QueryProvider ` ์์ฑํ๊ธฐ
308- ` query-provider.tsx ` ํ์ผ์ ` @/app/providers/query-provider.tsx ` ๊ฒฝ๋ก์ ์์ต๋๋ค .
313+ ` QueryProvider ` ๋ ` @/app/providers/query-provider.tsx ` ๊ฒฝ๋ก์ ์์นํฉ๋๋ค .
309314
310315``` tsx title="@/app/providers/query-provider.tsx"
311316import { QueryClient , QueryClientProvider } from " @tanstack/react-query" ;
@@ -328,7 +333,9 @@ export const QueryProvider = ({ client, children }: Props) => {
328333```
329334
330335### 2. ` QueryClient ` ์์ฑํ๊ธฐ
331- ` QueryClient ` ๋ API ์์ฒญ์ ๊ด๋ฆฌํ๋ ์ธ์คํด์ค์
๋๋ค. ` query-client.ts ` ํ์ผ์ ` @/shared/api/query-client.ts ` ์ ์ํด ์์ผ๋ฉฐ, ์ฟผ๋ฆฌ ์บ์ฑ์ ์ํด ํน์ ์ค์ ์ผ๋ก ` QueryClient ` ๋ฅผ ์์ฑํฉ๋๋ค.
336+
337+ ` QueryClient ` ๋ API ์์ฒญ์ ๊ด๋ฆฌํ๋ ์ธ์คํด์ค๋ก, Query Caching์ ์ํ ์ค์ ๊ณผ ํจ๊ป ์์ฑ๋ฉ๋๋ค.
338+ ์ด ์ธ์คํด์ค๋ ` @/shared/api/query-client.ts ` ํ์ผ์ ์ ์๋ฉ๋๋ค.
332339
333340``` tsx title="@/shared/api/query-client.ts"
334341import { QueryClient } from " @tanstack/react-query" ;
@@ -345,14 +352,18 @@ export const queryClient = new QueryClient({
345352
346353## ์ฝ๋ ์์ฑ
347354
348- API ์ฝ๋๋ฅผ ์์ฑํด์ฃผ๋ ๋๊ตฌ๋ค์ด ์์ง๋ง, ์ด๋ฌํ ๋ฐฉ์์ ์์ ์์ ์ฒ๋ผ ์ง์ ์ฝ๋๋ฅผ ์์ฑํ๋ ๋ฐฉ๋ฒ๋ณด๋ค ์ ์ฐ์ฑ์ด ๋ถ์กฑํ ์ ์์ต๋๋ค. ๊ทธ๋ฌ๋ Swagger ํ์ผ์ด ์ ๊ตฌ์ฑ๋์ด ์๊ณ ์ด๋ฌํ ์๋ ์์ฑ ๋๊ตฌ๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ, ์์ฑ๋ ์ฝ๋๋ฅผ ` @/shared/api ` ๋๋ ํ ๋ฆฌ์ ๋์ด ๊ด๋ฆฌํ๋ ๊ฒ์ด ํจ์จ์ ์ผ ์ ์์ต๋๋ค.
349-
355+ API ์ฝ๋๋ฅผ ์๋์ผ๋ก ์์ฑํ๋ ๋๊ตฌ๋ค์ด ์์ง๋ง, ์ด๋ฌํ ๋ฐฉ์์ ์ง์ ์ฝ๋๋ฅผ ์์ฑํ๋ ๋ฐฉ๋ฒ๋ณด๋ค ์ ์ฐ์ฑ์ด ๋ถ์กฑํ ์ ์์ต๋๋ค.
356+ ๊ทธ๋ฌ๋ Swagger ํ์ผ์ด ์ ๊ตฌ์ฑ๋ ๊ฒฝ์ฐ, ์๋ ์์ฑ ๋๊ตฌ๋ฅผ ํ์ฉํ๋ ๊ฒ์ด ํจ์จ์ ์ผ ์ ์์ผ๋ฉฐ, ์์ฑ๋ ์ฝ๋๋ ` @/shared/api ` ๋๋ ํ ๋ฆฌ์ ์ ์ฅํ์ฌ ์ฒด๊ณ์ ์ผ๋ก ๊ด๋ฆฌํ๋ ๊ฒ์ด ์ข์ต๋๋ค.
350357
351358## React Query๋ฅผ ์กฐ์งํํ๊ธฐ ์ํ ์ถ๊ฐ ์กฐ์ธ
359+
352360### API ํด๋ผ์ด์ธํธ
353361
354- ๊ณต์ ๋ ์ด์ด์์ ์ปค์คํ
API ํด๋ผ์ด์ธํธ ํด๋์ค๋ฅผ ์ฌ์ฉํ๋ฉด, ํ๋ก์ ํธ ๋ด API ์์
์ ์ผ๊ด์ฑ ์๊ฒ ๊ด๋ฆฌํ ์ ์์ต๋๋ค. ์ด๋ฅผ ํตํด ๋ก๊น
, ํค๋ ์ค์ , ๋ฐ์ดํฐ ์ ์ก ํ์(JSON ๋๋ XML ๋ฑ)์ ํ ๊ณณ์์ ๊ด๋ฆฌํ ์ ์๊ฒ ๋ฉ๋๋ค. ๋ํ ์ด ์ ๊ทผ ๋ฐฉ์์ API์์ ์ํธ์์ฉ์ ๋ํ ๋ณ๊ฒฝ ์ฌํญ์ ์ฝ๊ฒ ๋ฐ์ํ ์ ์๊ฒ ํ์ฌ, ํ๋ก์ ํธ์ ์ ์ง๋ณด์์ฑ๊ณผ ๊ฐ๋ฐ ํธ์์ฑ์ ํฌ๊ฒ ํฅ์์ํต๋๋ค .
362+ shared layer์์ ์ปค์คํ
API ํด๋ผ์ด์ธํธ ํด๋์ค๋ฅผ ์ฌ์ฉํ๋ฉด, ํ๋ก์ ํธ ๋ด API ์์ฒญ์ ๋ณด๋ค ์ผ๊ด์ฑ ์๊ฒ ๊ด๋ฆฌํ ์ ์์ต๋๋ค.
355363
364+ - ๋ก๊น
๋ฐ ์๋ฌ ํธ๋ค๋ง์ ์ค์์์ ๊ด๋ฆฌ ๊ฐ๋ฅ
365+ - ํค๋ ์ค์ ๋ฐ ๋ฐ์ดํฐ ์ ์ก ํ์(JSON, XML ๋ฑ)์ ์ผ๊ด์ ์ผ๋ก ์ ์ฉ
366+ - API ๋ณ๊ฒฝ ์ฌํญ์ ํ ๊ณณ์์ ์ฝ๊ฒ ๋ฐ์ํ์ฌ ์ ์ง๋ณด์์ฑ ํฅ์
356367
357368``` tsx title="@/shared/api/api-client.ts"
358369import { API_URL } from " @/shared/config" ;
@@ -420,6 +431,6 @@ export const apiClient = new ApiClient(API_URL);
420431
421432- [ (GitHub) ์ํ ํ๋ก์ ํธ] ( https://github.com/ruslan4432013/fsd-react-query-example )
422433- [ (CodeSandbox) ์ํ ํ๋ก์ ํธ] ( https://codesandbox.io/p/github/ruslan4432013/fsd-react-query-example/main )
423- - [ ์ฟผ๋ฆฌ ํฉํ ๋ฆฌ์ ๋ํ์ฌ] ( https://tkdodo.eu/blog/the-query-options-api )
434+ - [ Query Options์ ๋ํ์ฌ] ( https://tkdodo.eu/blog/the-query-options-api )
424435
425- [ public-api-for-cross-imports ] : /docs/reference/public-api#public-api-for-cross-imports
436+ [ public-api-for-cross-imports ] : /docs/reference/public-api#public-api-for-cross-imports
0 commit comments