You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Demo app showing the React-Admin offline-first capabilities.
4
+
5
+
It uses [vite-plugin-pwa](https://vite-pwa-org.netlify.app/) to make the app a Progressive Web App, and [configures the TanStack QueryClient](https://marmelab.com/react-admin/DataProviders.html#offline-support) to persist the query cache and pending mutations in the local storage.
6
+
7
+
## Installation
8
+
9
+
Install the application dependencies by running:
10
+
11
+
```sh
12
+
npm install
13
+
```
14
+
15
+
## Usage
16
+
17
+
The offline mode doesn't work in dev mode, that's a limitation of vite-pwa.
18
+
19
+
Build the application in production mode and serve it by running:
20
+
21
+
```sh
22
+
npm run build
23
+
npm run preview
24
+
```
25
+
26
+
Use the Browser DevTools (or phone Airplane mode) to simulate Offline mode when needed. Using TanStack Query DevTools does not work.
27
+
28
+
## Limitations
29
+
30
+
This demo is hooked up to the [JSONPlaceholder](https://jsonplaceholder.typicode.com/) API, so the changes are not persisted for real. But the mutation should be visible in the Network tab and not trigger errors.
0 commit comments