Add an overview here
Install the pacakage with:
npm i -D react-query-rewind
Import the ReactQueryRewind component and place it as close as possible to the root of your app.
Download the chrome extension from insert url here in order to time travel state in a developer toosl panel within your chrome browser.
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
const queryClient = new QueryClient();
ReactDOM.createRoot(document.getElementById('root')!).render(
<QueryClientProvider client={queryClient}>
<ReactQueryRewind/>
<App />
<ReactQueryDevtools />
</QueryClientProvider>
);
Contributions are always welcome. Please create a fork from https://github.com/oslabs-beta/react-query-rewind. To get started with the example apps:
From the root directory:
npm run install-all
npm run link-dependencies
- Installs all peer dependencies in our package to ensure there are no duplicates
- Can see all packages currently linked with
npm ls -g --depth=0 --link=tr
npm run watch
- Starts rollup in watch mode and creates dist folder
npm run link-package
- Links React Query Rewind
npm run example-1
- Starts the example server with webpack