🗡️
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. CONAN DATA

Conan State

PreviousGeneral ConceptsNextActions & Reducers

Last updated 4 years ago

Was this helpful?

Conan State are capsules of state that can be reused. To learn more about how to manage data in ConanJs, have a look at our

A convention used across the documentation, and that we invite you to use (but is not mandatory) is to suffix your Conan State name with a $. ie todos$

You interact and define your Conan State with reducers and actions

If you understand the concepts behind the actions and reducers, then you are ready to see how to create state

Subscribing to state will show you how to render your state either by connecting to your own components, or via live rendering

With Conan, you can create small Conan State elements which will be easier to test, develop and reuse. Then, you can compose new state based on this atomic states.

Not all state should be global, or in the context, or local.... With ConanJs you can easily decide how to scope your state

It is also possible to create interactions between Conan States, for this, you can leverage the reactions

Error handling is built-in to make your life easier...

... and so it is managing async use cases ...

... and testing is as simple as testing a normal JS object

Composing State
Scaling State
Orchestrating State
Life cycle
Async handling
Testing state
General Concepts section
Actions & Reducers
Creating State
Observing State
Observing state