MCPcopy Create free account
hub / github.com/TanStack/db / useCustomHook

Function useCustomHook

packages/react-db/tests/usePacedMutations.test.tsx:137–144  ·  view source on GitHub ↗
(wait: number)

Source from the content-addressed store, hash-verified

135
136 // Simulate a custom hook that creates strategy inline on each render
137 const useCustomHook = (wait: number) => {
138 return usePacedMutations({
139 onMutate,
140 mutationFn,
141 // Strategy is created inline on every render - new object reference each time
142 strategy: debounceStrategy({ wait }),
143 })
144 }
145
146 const { result, rerender } = renderHook(
147 ({ wait }) => useCustomHook(wait),

Callers 1

Calls 2

usePacedMutationsFunction · 0.90
debounceStrategyFunction · 0.90

Tested by

no test coverage detected