Rxova
Skip to content

Devtools Examples

import { createJourneyMachine } from "@rxova/journey-core";
import { attachJourneyDevtools } from "@rxova/journey-devtools-bridge";
const journeyMachine = createJourneyMachine(journey);
const detach = attachJourneyDevtools(journeyMachine, {
machineId: "checkout",
label: "Checkout Journey",
enabled: true
});
journeyMachine.startJourney();

When using bindings, attach once to the shared machine (outside or before React mount).

{ type: "startJourney" }
{ type: "goToNextStep" }
{ type: "goToStepById", stepId: "review" }
{ type: "goToPreviousStep", steps: 2 }
{ type: "goToLastVisitedStep" }
{ type: "send", event: { type: "custom", payload: { source: "panel" } } }
{ type: "resetJourney" }
{ type: "clearStepError", stepId: "review" }
  • currentStepId, history.timeline, history.index
  • visited, context
  • status, async