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
Copy file name to clipboardExpand all lines: README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,6 +104,16 @@ Use `maxLoadingTime` property if you want to limit loading time. Pages will swit
104
104
</Switch>
105
105
```
106
106
107
+
If you want to change LoadingContext globally you can pass `isLoading` property to the Switch. This way you don't need to add extra `loadingContext.done();` in your page components after fetching is done.
108
+
```js
109
+
import { useIsFetching } from'react-query';
110
+
constisFetching=useIsFetching();
111
+
112
+
<Switch isLoading={isFetching}>
113
+
...
114
+
</Switch>
115
+
```
116
+
107
117
Call `topbar.config()` if you want to change topbar configuration. More info <ahref="http://buunguyen.github.io/topbar/"target="_blank">here</a>.
0 commit comments