Skip to main content

functionalUpdate

还没翻译译自英文(tanstack.com)本页 14 段都还没译

function functionalUpdate<T>(updater, input): T;

Defined in: utils.ts:11

Applies a TanStack updater to a value.

If the updater is a function it is called with the previous value; otherwise the updater value is returned directly.

Type Parameters

T

T

Parameters

updater

Updater<T>

input

T

Returns

T