🗡️
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
  • State is easy to create
  • Create simple state and actions with one line...
  • ... Or if you want to, create your own actions.
  • State is easy to update
  • No need to create a pair of action/reducers
  • No boilerplate needed to deal with async actions
  • No need to map dispatch to props
  • State can be scoped
  • You can have global scope like Redux...
  • ... or local state, if you need to
  • State can be composed.
  • No need to map state to props
  • No need to use selectors
  • State can be orchestrated
  • Add reactions to your state
  • Easy to test End to End
  • Meaningful Logging out of the box
  • More Demos
  • And more...

Was this helpful?

  1. Why ConanJs...

... if coming from Redux

PreviousWhy ConanJs...Next... if using vanilla React

Last updated 4 years ago

Was this helpful?

If coming from Redux, we think you are going to be impressed with our Hello Wow! demo

This demo is to showcase Conan State, which are our reusable capsules of state.

If you are familiar with the TODO example from Redux, you might find this article also interesting:

Below we explore in detail the benefits of using ConanJs over Redux.

State is easy to create

Create simple state and actions with one line...

You can use Conan.light

... Or if you want to, create your own actions.

You can use Conan.state if you want to create your own custom actions.

State is easy to update

No need to create a pair of action/reducers

All the logic needed to update the state is encapsulated inside the action.

No boilerplate needed to deal with async actions

Async actions are easy to implement, and you won't need additional libraries

No need to map dispatch to props

You can invoke the actions directly from the state

State can be scoped

In ConanJs state is represented with Conan State, which ultimately is a plain JS object, which means that, as with any other object, you decide how to scope.

You can have global scope like Redux...

Sometimes it makes sense to have global state

... or local state, if you need to

But many times, you might feel forced to add it to your global state, or you need to use other mechanisms (setState, hooks...), with ConanJs you can just make your state local.

State can be composed.

No need to map state to props

You can have you state distributed in many smaller states, and then combine it, if you need to

No need to use selectors

You can just filter the state, or map it

State can be orchestrated

Add reactions to your state

With ConanJs is simple to write logic as a reaction to an state change, we call this state orchestration, and it will help you building complex state interactions.

Easy to test End to End

1) Create state, 2) Perform any number of actions, sync or async, 3) Check the final value of the state. With ConanJs end to end testing is simple

Meaningful Logging out of the box

No need to add third party libraries to log out what the framework is doing behind the scenes

More Demos

This demos will provide you with real world scenarios to use ConanJs

And more...

If this was not enough, we have some more features included.

Hi there, fellow Redux user!
Todos
Github issues viewer
ConanFlow
Dependency Injection
ASAPs
Hello World
ConanJs vs Redux. Comparing a simple TODO AppMedium
Logo