Skip to content

Commit

Permalink
feat: tanstack query 및 provider 기초 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
DongjaJ committed Nov 1, 2023
1 parent 1bb8424 commit 80d0fa7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/shelter/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import React from 'react';
import ReactDOM from 'react-dom/client';

Expand All @@ -15,10 +17,15 @@ async function deferRender() {
return worker.start();
}

const queryClient = new QueryClient();

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

0 comments on commit 80d0fa7

Please sign in to comment.