@toa.io/extensions.state

0.24.0-alpha.0 • Public • Published

Toa State

TL;DR

// Node.js Bridge
async function effect (input, context) {
  context.state.a = 1 // set value to the state
}

async function computation (input, context) {
  return context.state.a // get value from the state
}

Definition

state is an initially empty object created when a Component instance starts running. It is shared across Operations of that Component instance.

Manifest

To enable extension add its null manifest.

# manifest.toa.yaml

state: ~

Readme

Keywords

none

Package Sidebar

Install

npm i @toa.io/extensions.state

Weekly Downloads

321

Version

0.24.0-alpha.0

License

none

Unpacked Size

4.54 kB

Total Files

8

Last publish

Collaborators

  • agurtovoi