Created
October 2, 2022 15:03
-
-
Save AlaBenAicha/b8da3a7dcc54b113f193e0102ce1ff98 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// pages/_app.tsx | |
import React from "react"; | |
import type { AppProps } from "next/app"; | |
import { QueryClient, QueryClientProvider } from "react-query"; | |
import { ReactQueryDevtools } from "react-query/devtools"; | |
function MyApp({ Component, pageProps }: AppProps) { | |
const [queryClient] = React.useState(() => new QueryClient()); | |
return ( | |
// Provide the client to your App | |
<QueryClientProvider client={queryClient}> | |
<Component {...pageProps} /> | |
<ReactQueryDevtools initialIsOpen={false} /> | |
</QueryClientProvider> | |
); | |
} | |
export default MyApp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment