TinyBase logoTinyBase β

useCheckpointIds

The useCheckpointIds hook returns a reactive object reflecting the CheckpointIds (backward, current, forward) in a Checkpoints object, and registers a listener so that any changes will update .current.

useCheckpointIds(checkpointsOrCheckpointsId?: MaybeGetter<undefined | CheckpointsOrCheckpointsId>): {current: CheckpointIds}
TypeDescription
checkpointsOrCheckpointsId?MaybeGetter<undefined | CheckpointsOrCheckpointsId>

The Checkpoints object to use (plain or getter), or its Id.

returns{current: CheckpointIds}

A reactive object with a current CheckpointIds property.

Since

v8.1.0