FlowPresentationResult with an outcome. For richer lifecycle observation (screen changes, state transitions), a session exposes a delegate.
FlowPresentationResult
Both presentPlacement (resolved value) and <FlowPilotPresenter onComplete={...} /> give you this shape:
| Outcome | Meaning |
|---|---|
completed | The user reached the end of the flow, or a closeFlow action completed it. |
dismissed | The user closed the flow before finishing (for example a back-out or a dismiss()). |
error | FlowPilot had nothing to present, or the presentation failed before a screen showed. error holds the cause. |
Unlike the iOS SDK’s
FlowResult, the Expo FlowPresentationResult carries only outcome and error. It does not bundle finalVariables, screensVisited, durationMs, or experimentAssignments. Read final variable state from the session (below), and observe experiment assignment through the analytics callback (experiment_exposure).Reading final variable state
On the declarative path you hold theFlowSession, so you can read its variable store after completion. The session’s variableStore is public.
variableStore.getAll() returns a Record<string, VariableValue> of the flow’s variables at the moment the flow ended. See Variables and context for the value types and how to read individual keys.
Observing the flow lifecycle
AFlowSession accepts a delegate for finer-grained events than the final outcome. Set it with session.setDelegate(...) before session.start().
Useful session accessors
A liveFlowSession exposes read-only state you can inspect:
Common mistakes
- Expecting
finalVariableson the result object. It is not there in this build. Readsession.variableStore.getAll()instead. - Reading the session after you cleared it. If you
setSession(null)before readingvariableStore, the reference may be gone. Read variables first, then clear. - Treating
dismissedas failure. A dismissal is a normal user choice, not an error. Onlyerrorindicates something went wrong.