TinyBase logoTinyBase β

useCheckpointsOrCheckpointsById

The useCheckpointsOrCheckpointsById hook is used to get a reference to a Checkpoints object from a Provider context, or have it passed directly.

useCheckpointsOrCheckpointsById(checkpointsOrCheckpointsId?: MaybeGetter<undefined | CheckpointsOrCheckpointsId>): () => Checkpoints | undefined
TypeDescription
checkpointsOrCheckpointsId?MaybeGetter<undefined | CheckpointsOrCheckpointsId>

The Checkpoints object, its Id, or a getter returning either.

returns() => Checkpoints | undefined

A getter function returning the Checkpoints object, or undefined.

Since

v8.1.0