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
docs(react-native): add code examples for common use cases (TanStack#3042)
* docs: add React Native code examples for common use cases
- Online status management
- Refetch on App focus
- Refresh on Screen focus
* docs(react-native): use useOnlineManager example
Copy file name to clipboardExpand all lines: docs/src/pages/react-native.md
+61-1Lines changed: 61 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,68 @@ id: react-native
3
3
title: React Native
4
4
---
5
5
6
-
React Query is designed to work out of the box with React Native, with the exception of the devtools, which are only supported with React DOM at this time.
6
+
React Query is designed to work out of the box with React Native, with the exception of the devtools, which are only supported with React DOM at this time.
7
7
8
8
There is a 3rd party [Flipper](https://fbflipper.com/docs/getting-started/react-native/) plugin which you can try: https://github.com/bgaleotti/react-query-native-devtools
9
9
10
10
If you would like to help us make the built-in devtools platform agnostic, please let us know!
11
+
12
+
## Online status management
13
+
14
+
React Query already supports auto refetch on reconnect in web browser.
15
+
To add this behavior in React Native you have to use React Query `onlineManager` as in the example below:
0 commit comments