MCPcopy Create free account
hub / github.com/middleapi/orpc / onErrorDeferred

Function onErrorDeferred

packages/react/src/deferred-interceptors.ts:28–34  ·  view source on GitHub ↗
(callback, ...rest)

Source from the content-addressed store, hash-verified

26 * Like `onError`, but defers execution, useful for updating states.
27 */
28export const onErrorDeferred: typeof onError = (callback, ...rest) => {
29 return onError((...args) => {
30 setTimeout(() => {
31 callback(...args)
32 }, 6)
33 }, ...rest)
34}
35
36/**
37 * Like `onFinish`, but defers execution, useful for updating states.

Callers 1

Calls 2

onErrorFunction · 0.90
callbackFunction · 0.85

Tested by

no test coverage detected