API Reference
Comprehensive API reference for all useFlow functions, components, and types.
Core APIs
Section titled “Core APIs”Create typed flow definitions with steps, branching, and versioning.
Primary React component for rendering flows with full control over layout and behavior.
Access flow state and navigation methods from step components.
Configure default settings for all flows in your application.
Persistence APIs
Section titled “Persistence APIs”Create persisters with validation, TTL, and callbacks.
Built-in stores for localStorage, sessionStorage, AsyncStorage, and memory.
Implement custom storage backends for databases, APIs, or cloud storage.
Type utilities
Section titled “Type utilities”Comprehensive TypeScript types for type-safe flow development:
FlowDefinition- Flow configuration typeRuntimeFlowDefinition<TDefinition, TContext>- Returned by defineFlow()UseFlowReturn<TContext>- Return type of useFlowState()FlowContext- Base type for context objectsPersistedFlowState<TContext>- Saved state structureMigrateFunction<TContext>- Migration function typeResolveFunction- Branching resolver type
See the Type Safety guide for detailed type information.