MCPcopy Create free account
hub / github.com/tinyplex/tinybase / useGoToCallback

Function useGoToCallback

docs/pseudo.esm.sh/tinybase@9.0.0/ui-solid/index.js:1037–1048  ·  view source on GitHub ↗
(getCheckpointId, checkpointsOrCheckpointsId, then = getUndefined)

Source from the content-addressed store, hash-verified

1035var useGoBackwardCallback = (checkpointsOrCheckpointsId) => useCheckpointAction(checkpointsOrCheckpointsId, "goBackward");
1036var useGoForwardCallback = (checkpointsOrCheckpointsId) => useCheckpointAction(checkpointsOrCheckpointsId, "goForward");
1037var useGoToCallback = (getCheckpointId, checkpointsOrCheckpointsId, then = getUndefined) => {
1038 const checkpoints = useCheckpointsOrCheckpointsById(
1039 checkpointsOrCheckpointsId
1040 );
1041 return (parameter) => ifNotUndefined(
1042 getThing(checkpoints),
1043 (resolvedCheckpoints) => ifNotUndefined(
1044 getCheckpointId(parameter),
1045 (checkpointId) => then(resolvedCheckpoints.goTo(checkpointId), checkpointId)
1046 )
1047 );
1048};
1049var useUndoInformation = (checkpointsOrCheckpointsId) => {
1050 const checkpoints = useCheckpointsOrCheckpointsById(
1051 checkpointsOrCheckpointsId

Callers

nothing calls this directly

Calls 3

getThingFunction · 0.70
goToMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…