JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 24
  • Score
    100M100P100Q47291F
  • License MIT

Barebone state manager implementation based on Cerebral signals conception

Package Exports

  • appstate

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (appstate) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

AppState

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

Usage

appstate.create(name, actions)

Create signal function. Accept name string and actions array.

Example:

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

signal.run(state, args)

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