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
- Host: GitHub
- URL: https://github.com/pqml/state
- Owner: pqml
- License: mit
- Created: 2018-09-25T21:29:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-25T01:04:24.000Z (about 6 years ago)
- Last Synced: 2025-03-18T03:46:19.053Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 174 KB
- Stars: 7
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.hbs
- License: LICENSE
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
```
```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}}