Skip to content
Source
Sign inSign up
TanStack/query

feat(notifyManager): batch method configuration #6600

MergedNathanHuisman(GitHub profile, opens in a new tab)merged 19 commits intomain fromrefs/pull/6600/headmerged by TkDodo View on GitHub

Showing 10 changed files with 107 additions and 0 deletions (loading 7).

x
0 of 10 viewed, 10 left
93 additions and 0 deletionsdocs/react/reference/notifyManager.mdAdded
View file
@@ -0,0 +1,93 @@
+---
+id: NotifyManager
+title: NotifyManager
+---
+​
+The `notifyManager` handles scheduling and batching callbacks in Tanstack Query.
+​
+It exposes the following methods:
+​
+- [batch](#notifymanagerbatch)
+- [batchCalls](#notifymanagerbatchcalls)
+- [schedule](#notifymanagerschedule)
+- [setNotifyFunction](#notifymanagersetnotifyfunction)
+- [setBatchNotifyFunction](#notifymanagersetbatchnotifyfunction)
+- [setScheduler](#notifymanagersetscheduler)
+​
+## `notifyManager.batch`
+​
+`batch` can be used to batch all updates scheduled inside the passed callback.
+This is mainly used internally to optimize queryClient updating.
+​
+```ts
+function batch<T>(callback: () => T): T
+```
+​
+## `notifyManager.batchCalls`
+​