appstate

Barebone state manager implementation based on Cerebral signals conception

Usage no npm install needed!

<script type="module">
  import appstate from 'https://cdn.skypack.dev/appstate';
</script>

README

AppState Build Status

Appstate is a Javascript state manager, based on Cerebral signals conception. Appstate use Baobab as main state storage.

Usage

appstate.create(actions)

Create signal function. Accept actions array.

Example:

   var actions = [
     syncAction,
     [
      asyncAction, {
        success: [successSyncAction],
        error: [errorSyncAction]
       }
     ]
   ];
   
   var signal = appstate.create(actions) // => Function

signal(state, services, args)

Run signal function, return Promise with signal run results. Accept Baobab tree reference as state, services and args object.