sajad torkamani

Install package

npm i react-query

Wrap your app in the <QueryClientProvider>

// Create a client
const queryClient = new QueryClient()

function App() {
  return (
    // Provide the client to your App
    <QueryClientProvider client={queryClient}>
      <YourComponents />
      <ReactQueryDevtools initialIsOpen={false} />
    </QueryClientProvider>
  )
}

Sources

Leave a comment

Your email address will not be published. Required fields are marked *