🗡️
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
  • light<DATA>
  • state<DATA, REDUCERS extends Reducers<DATA> = {}, ACTIONS = any>

Was this helpful?

  1. API
  2. Main Classes

Conan

The class Conan contains the following methods:

light<DATA>

light is the method we use to create a simple Conan State without passing reducers and actions

Input Params

name

Type: string required

the name we want to use for this state

initialData

Type: DATA

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

nature

Type: FlowEventNature

TBC: Que mierdas es esto Alberto?

Returns

ConanState

The newly created state

state<DATA, REDUCERS extends Reducers<DATA> = {}, ACTIONS = any>

state is the method we use to create a Conan State when we need to add extra reducers and or actions

Params

data

Type: StateDef required

the StateDef object that contains our custom actions and reducers

Return type

ConanState

The newly created state

PreviousMain ClassesNextStateDef

Last updated 4 years ago

Was this helpful?