MCPcopy
hub / github.com/TanStack/query / setActTimeout

Function setActTimeout

packages/react-query/src/__tests__/utils.tsx:51–57  ·  view source on GitHub ↗
(fn: () => void, ms?: number)

Source from the content-addressed store, hash-verified

49}
50
51export function setActTimeout(fn: () => void, ms?: number) {
52 return setTimeout(() => {
53 act(() => {
54 fn()
55 })
56 }, ms)
57}
58
59// This monkey-patches the isServer-value from utils,
60// so that we can pretend to be in a server environment

Callers 5

PageFunction · 0.90
PageFunction · 0.90
PageFunction · 0.90
PageFunction · 0.90
BlinkFunction · 0.70

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…