Rxova
Skip to content

Type Alias: LinearJourneyBundle<TContext, TStepId, TPlugins>

@rxova/journey-react


@rxova/journey-react / LinearJourneyBundle

type LinearJourneyBundle<TContext, TStepId, TPlugins> = JourneyBundleBase<LinearJourneyMachine<TContext, TStepId, TPlugins>, TContext, TStepId, LinearJourneySnapshot<TContext, TStepId>> & object;

Defined in: react/src/react.types.ts:298

What createLinearJourney() returns: the shared bundle surface with the linear verbs — navigate where graph has send, and useStepHandler to gate goToNextStep from a component. TPlugins flows from the options’ plugins tuple into machine.plugins, exactly as in the graph tier.

navigate: LinearJourneyMachine<TContext, TStepId, TPlugins>["navigate"];

machine.navigate, verbatim — callable from anywhere, React or not.

useStepHandler: <TResult>(stepId, handler) => void;

Registers forward-navigation work for stepId while the calling component is mounted (the linear counterpart of graph send work): run gates goToNextStep, a throw/reject cancels the move and lands in currentStep.async.error, commit stages the context transactionally.

Type ParameterDefault type
TResultvoid
ParameterType
stepIdTStepId
handlerLinearJourneyStepHandler<TContext, TResult, TStepId>

void

Type ParameterDefault type
TContext-
TStepId extends string-
TPlugins extends readonly AnyJourneyPlugin[]readonly []