TinyBase logoTinyBase

Checkpoints hooks

This is the collection of checkpoints hooks within the ui-react module. There are 14 checkpoints hooks in total.

useCheckpoint

The useCheckpoint hook returns the label for a checkpoint, and registers a listener so that any changes to that result will cause a re-render.

Read more

useCheckpointIds

The useCheckpointIds hook returns an array of the checkpoint Ids being managed by this Checkpoints object, and registers a listener so that any changes to that result will cause a re-render.

Read more

useCheckpointIdsListener

The useCheckpointIdsListener hook registers a listener function with the Checkpoints object that will be called whenever its set of checkpoints changes.

Read more

useCheckpointListener

The useCheckpointListener hook registers a listener function with the Checkpoints object that will be called whenever the label of a checkpoint changes.

Read more

useCheckpoints

The useCheckpoints hook is used to get a reference to a Checkpoints object from within a Provider component context.

Read more

useCheckpointsIds

The useCheckpointsIds hook is used to retrieve the Ids of all the named Checkpoints objects present in the current Provider component context.

Read more

useCheckpointsOrCheckpointsById

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

Read more

useCreateCheckpoints

The useCreateCheckpoints hook is used to create a Checkpoints object within a React application with convenient memoization.

Read more

useGoBackwardCallback

The useGoBackwardCallback hook returns a callback that moves the state of the underlying Store back to the previous checkpoint, effectively performing an 'undo' on the Store data.

Read more

useGoForwardCallback

The useGoForwardCallback hook returns a callback that moves the state of the underlying Store forwards to a future checkpoint, effectively performing an 'redo' on the Store data.

Read more

useGoToCallback

The useGoToCallback hook returns a parameterized callback that can be used to move the state of the underlying Store backwards or forwards to a specified checkpoint.

Read more

useRedoInformation

The useRedoInformation hook returns an UndoOrRedoInformation array that indicates if and how you can move the state of the underlying Store forwards to a future checkpoint.

Read more

useSetCheckpointCallback

The useSetCheckpointCallback hook returns a parameterized callback that can be used to record a checkpoint of a Store into a Checkpoints object that can be reverted to in the future.

Read more

useUndoInformation

The useUndoInformation hook returns an UndoOrRedoInformation array that indicates if and how you can move the state of the underlying Store backward to the previous checkpoint.

Read more