반응형
250x250
Notice
Recent Posts
Recent Comments
Link
관리 메뉴

짧은코딩

SWR Devtools(디버깅 유용) 본문

인프런, 유데미/Slack 클론 코딩

SWR Devtools(디버깅 유용)

5_hyun 2022. 8. 1. 14:51

SWR Devtools

SWR은 디버깅이 쉽지 않다. 따라서 유용한 페키지를 설치해야한다.

npm i @jjordy/swr-devtools

이렇게 설치할 수 있다.

 

-공식 문서

https://www.npmjs.com/package/@jjordy/swr-devtools

 

@jjordy/swr-devtools

Devtools for SWR. Latest version: 2.2.0, last published: 9 months ago. Start using @jjordy/swr-devtools in your project by running `npm i @jjordy/swr-devtools`. There are no other projects in the npm registry using @jjordy/swr-devtools.

www.npmjs.com

 

-client.tsx

render(
  <BrowserRouter>
    <SWRDevtools>
      <App />
    </SWRDevtools>
  </BrowserRouter>,
  document.querySelector('#app'),
);

이렇게 SWRDevtools를 해준다.

 

그러면 이런 창이 뜨게된다.

728x90
반응형
Comments