endHold
Ends a Suspense hold started with beginHold.
Ends a Suspense hold started with beginHold. Call wakeSuspended first, so the memos and effects that waited are queued; this then schedules the lane for them and, once the lane is idle and no hold remains, resolves the transitions that were waiting. Extra calls never take the count below zero. Does nothing before the transition machinery exists.
Import#
ts
import { endHold } from "@shadow-js/core/extend";
Signature#
ts
function endHold(): void
Examples#
ts
import { endHold, wakeSuspended } from "@shadow-js/core/extend";
export function release(): void {
wakeSuspended(); // the held readers run again with the data that arrived
endHold();
}