new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

TanStack Query · Reference · all subjects

notifymanager

7 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

notifyManager.batch method

The batch method batches all updates scheduled inside the passed callback. It is mainly used internally to optimize queryClient updating. The signature is function batch<T>(callback: () => T): T, where it takes a callback function and returns the result of calling that callback.

notifyManager.batchCalls method

The batchCalls method is a higher-order function that takes a callback and wraps it. All calls to the wrapped function schedule the callback to be run on the next batch. The signature is function batchCalls<T extends Array<unknown>>(callback: BatchCallsCallback<T>): BatchCallsCallback<T>, where BatchCallsCallback<T extends Array<unknown>> = (...args: T) => void.

notifyManager.schedule method

The schedule method schedules a function to be run on the next batch. By default, the batch is run with a setTimeout, but this can be configured. The signature is function schedule(callback: () => void): void.

notifyManager.setNotifyFunction method

The setNotifyFunction method overrides the notify function. The notify function is passed the callback when it should be executed. The default notifyFunction just calls the callback. This can be used to wrap notifications with React.act while running tests.

notifyManager.setBatchNotifyFunction method

The setBatchNotifyFunction method sets the function to use for batched updates. If your framework supports a custom batching function, you can let TanStack Query know about it by calling this method.

notifyManager.setScheduler method

The setScheduler method configures a custom callback that schedules when the next batch runs. The default behaviour is setTimeout(callback, 0). Common configurations include queueMicrotask to schedule in the next microtask, requestAnimationFrame to schedule before the next frame is rendered, or setTimeout(cb, 10) to schedule some time in the future.

notifyManager overview

The notifyManager handles scheduling and batching callbacks in TanStack Query. It exposes methods for batch, batchCalls, schedule, setNotifyFunction, setBatchNotifyFunction, and setScheduler.

Give your agent this brain