Skip to content

Commit f612c58

Browse files
authored
Merge pull request #29 from chogyejin/patch-1
docs: 패키지 매니저 bun 추가, devtools 내용 수정
2 parents fe69e6c + abbdc10 commit f612c58

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,19 @@ function App() {
153153
[목차 이동](#주요-컨셉-및-가이드-목차)
154154

155155
- [React Query Devtools 공식 문서](https://tanstack.com/query/v5/docs/react/devtools)
156-
- react-query는 `전용 devtools`제공한다.
156+
- react-query는 `전용 devtools`제공하며 별도의 패키지 설치가 필요하다.
157157
- devtools를 사용하면 React Query의 모든 내부 동작을 `시각화`하는 데 도움이 되며 문제가 발생하면 `디버깅 시간을 절약`할 수 있다.
158158
- devtools는 기본값으로 `process.env.NODE_ENV === 'development'` 인 경우에만 실행된다, 즉 일반적으로 개발 환경에서만 작동하도록 설정되어 있으므로, 프로젝트 배포 시에 Devtools 삽입 코드를 제거해 줄 필요가 없다.
159-
- **devtools를 사용하기 위해서는 별도의 패키지 설치가 필요하다.**
159+
- Next 13+의 App Dir에선 dev dependency로 설치해야 동작한다.
160160

161161
```bash
162162
$ npm i @tanstack/react-query-devtools
163163
# or
164164
$ pnpm add @tanstack/react-query-devtools
165165
# or
166166
$ yarn add @tanstack/react-query-devtools
167+
# or
168+
$ bun add @tanstack/react-query-devtools
167169
```
168170

169171
```tsx
@@ -183,10 +185,11 @@ function App() {
183185

184186
- initialIsOpen (Boolean)
185187
- `true`이면 개발 도구가 기본적으로 열려 있도록 설정할 수 있다.
186-
- position?: ("top-left" | "top-right" | "bottom-left" | "bottom-right")
187-
- 기본값: `bottom-left`
188+
- buttonPosition?: ("top-left" | "top-right" | "bottom-left" | "bottom-right" | "relative")
189+
- 기본값: `bottom-right`
188190
- devtools 패널을 열고 닫기 위한 로고 위치
189-
- 일반적으로 initialIsOpen, position을 자주 사용하지만, panelProps, closeButtonProps, toggleButtonProps와 같은 옵션들도 존재한다.
191+
- `relative`일 때 버튼은 devtools를 렌더링하는 위치에 배치된다.
192+
- 일반적으로 initialIsOpen, buttonPosition을 자주 사용하며 그 외에 position, client와 같은 옵션들도 존재한다.
190193

191194
<br />
192195

@@ -1269,6 +1272,8 @@ $ npm i react-error-boundary
12691272
$ pnpm add react-error-boundary
12701273
# or
12711274
$ yarn add react-error-boundary
1275+
# or
1276+
$ bun add react-error-boundary
12721277
```
12731278

12741279
- 설치 후에 아래와 같은 QueryErrorBoundary라는 컴포넌트를 생성하고, 그 내부에 `useQueryErrorResetBoundary` 훅을 호출해 `reset` 함수를 가져온다.

0 commit comments

Comments
 (0)