Type Alias: LinearJourneyBundle<TContext, TStepId, TPlugins>
@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.
Type Declaration
Section titled “Type Declaration”navigate
Section titled “navigate”navigate: LinearJourneyMachine<TContext, TStepId, TPlugins>["navigate"];machine.navigate, verbatim — callable from anywhere, React or not.
useStepHandler
Section titled “useStepHandler”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 Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
TResult | void |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
stepId | TStepId |
handler | LinearJourneyStepHandler<TContext, TResult, TStepId> |
Returns
Section titled “Returns”void
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
TContext | - |
TStepId extends string | - |
TPlugins extends readonly AnyJourneyPlugin[] | readonly [] |