Rxova
Skip to content

React Examples

Use this page as a guide to common React integration scenarios.

React examples focus on wiring and component patterns. For runtime internals, pair them with Core docs.

What it shows:

  • createJourney(definition, options?)
  • separate views
  • JourneyProvider
  • StepRenderer

Start from: /docs/react/quickstart

What it shows:

  • useJourneySnapshot()
  • useJourneyApi()
  • useJourneySelector()
  • useJourneyEvent()

Use this when components need machine state or actions but are not part of step rendering.

What it shows:

  • goToNextStep
  • goToPreviousStep
  • goToLastVisitedStep
  • explicit event sending via api.send(...)

Runtime semantics live in: /docs/core/api and /docs/core/history

What it shows:

  • reading snapshot.async
  • loading and error rendering
  • clearStepError

Runtime async rules live in: /docs/core/async

What it shows:

  • getStepMeta(stepId) from React actions or selectors

Step metadata semantics live in: /docs/core/api

What it shows:

  • passing journey.machine to attachJourneyDevtools(...)

What it shows:

  • useMemo(() => createJourney(...), [])
  • disposeOnUnmount for provider-owned cleanup

For an end-to-end setup across core, react, and the devtools bridge, see the demo app in this repository.