🗡️
ConanJs
  • What is ConanJs?
  • Why ConanJs...
    • ... if coming from Redux
    • ... if using vanilla React
    • ... if learning React
    • ... if not using React
  • How to install/use ConanJs
  • About us / Github / Contact us
  • Demos
    • Demo Gallery
    • Conan State Demos
      • Hello World
      • Todos
        • Todos - Basic
        • Todos - Async
        • Todos - Optimistic
      • Github issues viewer
    • Conan Flow Demos
      • Authentication
  • CONAN DATA
    • General Concepts
    • Conan State
      • Actions & Reducers
        • Reducers
        • Actions
      • Creating State
      • Observing State
        • Live rendering
        • Connecting
      • Composing State
      • Scaling State
      • Orchestrating State
      • Life cycle
        • Async handling
        • Introspection
      • Testing state
    • Conan Flow
      • Creating Flows
      • Serialising Flows
      • Observing Flows
  • CONAN Runtime
  • Dependency Injection
    • General Concepts
    • Creating the Context
    • Using the Context
  • ASAPs
  • Logging
  • API
    • Main Classes
      • Conan
        • StateDef
      • ConanState
      • ConanFlow
        • UserFlowDef
        • UserStatusDef
        • Status
    • Conan State Classes
      • Thread
      • ConnectedState
      • MonitorInfo
      • MetaInfo
    • Dependency Injection
      • DiContextFactory
    • ASAPS
      • Asaps
      • Asap
Powered by GitBook
On this page
  • on
  • start
  • toStateAll
  • toState

Was this helpful?

  1. API
  2. Main Classes

ConanFlow

The class ConanFlow contains the following methods:

on

this method allows connecting a Conan state with a React component, using a mapper function to describe the mapping

Input

statusName

Type: STATUS required

the STATUS we want to hook into

Returns

StatusDef<USER_STATUSES, STATUS>

The StatusDef object allows to add reactions, invoke transitions, steps and obtain the last ConanState Data

start

this method allows connecting a Conan state with a React component, using a mapper function to describe the mapping

Input

initialStatus

Type: StatusLike<USER_STATUSES> optional

optional initial STATUS to start the flow with

Returns

ConanFlow

this ConanFlow

toStateAll

this method creates a ConanState with the state of each status

Returns

ConanState<Status>

contains the states for all the statuses

toState

this method creates a ConanState with the state of the status passed as input

Input

status

Type: STATUS required

the STATUS we want to obtain the ConanState for

Returns

ConanState<USER_STATUSES[STATUS]>

ConanState for the status passed

PreviousConanStateNextUserFlowDef

Last updated 4 years ago

Was this helpful?