16.0.1 • Published 6 years ago

@the-/state v16.0.1

Weekly downloads
550
License
MIT
Repository
github
Last release
6 years ago

@the-/state

npm Version

State holder for the-components

Installation

$ npm install @the-/state --save

Usage

'use strict'

const { TheState } = require('@the-/state')

async function tryExample() {
  const state = new TheState()

  const account = state.scope('account')
  state.subscribe(() => {
    // Handle change
    /* ... */
  })

  account.set({ name: 'John', password: 'xxxxx' })

  console.log(account.get('name')) // John
}

tryExample().catch((err) => console.error(err))

API Guide

See API Guide for more detail

License

This software is released under the MIT License.

Links

16.0.1

6 years ago

16.0.0

6 years ago

15.4.14

6 years ago

15.4.13

6 years ago

15.4.2

6 years ago

15.2.0

6 years ago

15.1.4

6 years ago