🗡️
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

Was this helpful?

  1. API
  2. Main Classes
  3. Conan

StateDef

PreviousConanNextConanState

Last updated 4 years ago

Was this helpful?

the class StateDef holds the definition of a state, that can be passed to

Params

name

Type: string required

the name we want to use for this state

initialData

Type: AsapLike<DATA> required

the initial data we want to have when the state is created

reducers

Type: ReducersFn<DATA, REDUCERS> optional

the reducers that will act on this state

actions

Type: ActionsFn<DATA, REDUCERS, IPartial<ACTIONS>> optional

the actions that will act on this state

autoBind

Type: any optional

any object with logic we want to auto bind with this state

pipelineListener

Type: IConsumer<FlowEvent> optional

TBC: Que mierdas es esto Alberto?

cancelAutoStart

Type: boolean optional

true if we want to cancel the auto start of the state

reactions

Type: RUserReactionsDef<{ nextData: DATA }, 'nextData', { nextData: ACTIONS & REDUCERS }> optional

TBC: Que mierdas es esto Alberto?

nature

Type: FlowEventNature optional

TBC: Que mierdas es esto Alberto?

Conan.state