Skip to content

Commit

Permalink
✨ 리액트 쿼리 초기 세팅
Browse files Browse the repository at this point in the history
  • Loading branch information
ttaerrim committed Nov 21, 2023
1 parent e3aaa58 commit bba6a36
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import { CookiesProvider } from 'react-cookie';

import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import ReactDOM from 'react-dom/client';

import App from './App';
Expand All @@ -15,11 +17,16 @@ async function enableMocking() {
return worker.start();
}

const queryClient = new QueryClient();

enableMocking().then(() => {
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<CookiesProvider>
<App />
<QueryClientProvider client={queryClient}>
<App />
<ReactQueryDevtools initialIsOpen={false} />
</QueryClientProvider>
</CookiesProvider>
</React.StrictMode>,
);
Expand Down

0 comments on commit bba6a36

Please sign in to comment.