An open API service indexing awesome lists of open source software.

https://github.com/pqml/state

Simple signal-based state management
https://github.com/pqml/state

Last synced: 22 days ago
JSON representation

Simple signal-based state management

Awesome Lists containing this project

README

        

# State
[:books: **Documentation**](#api) | [:bar_chart: **Benchmarks**](https://pqml.github.io/state) | [:globe_with_meridians: **Internet modules**](https://www.npmjs.com/org/internet)

- Create tiny signal-based stores
- `Signal` class to create your own signals


# Requirements

- ES6 Modules support
- Using a module bundler like Webpack, Rollup or Parcel
- [Native support from browser](https://caniuse.com/#feat=es6-module)
- From NodeJS with something like [esm](https://github.com/standard-things/esm)


# Module Installation

```sh
# using npm
$ npm install --save @internet/state

# or using yarn
$ yarn add @internet/state
```



# API

```js
import { createStore, Signal } from '@internet/state'
```

- [:mailbox_with_mail: **createStore**](#createStore): _Create a new store: a collection of [StoreSignal](#StoreSignal) instances_
- [:satellite: **Signal**](#Signal): _Signal class_



## :mailbox_with_mail: createStore()
{{#globals name="createStore"}}
{{>body~}}
{{/globals}}



## :mailbox_with_mail: StoreSignal
{{#globals name="StoreSignal"}}
{{>body~}}
#### API
{{>member-index~}}


{{>members~}}
{{/globals}}



## :satellite: Signal
{{#globals name="Signal"}}
{{>body~}}
#### API
{{>member-index~}}


{{>members~}}
{{/globals}}