[]previous and next page

BoundaryHold

The hold of one Suspense boundary: engaged by a transition read, released when its data arrived.

The hold of one Suspense boundary: engaged by a transition read, released when its data arrived. From transitionHooks()?.boundaryHold().

Import#

ts
import type { BoundaryHold } from "@shadow-js/core/extend";

Signature#

ts
interface BoundaryHold {
  /** Engages the hold (a second call changes nothing) so the boundary keeps its content; returns true. */
  engage(): boolean;
  /** When engaged: wakes the readers that waited, then ends the hold. Otherwise does nothing. */
  release(): void;
  /** True while the hold is engaged. */
  holding(): boolean;
}

Members#

Name Type Description
engage engage(): boolean Engages the hold (a second call changes nothing) so the boundary keeps its content; returns true.
release release(): void When engaged: wakes the readers that waited, then ends the hold. Otherwise does nothing.
holding holding(): boolean True while the hold is engaged.