3.1.0 • Published 5 years ago
the-scope v3.1.0
the-scope
State scope for the-store
Installation
$ npm install the-scope --save
Usage
'use strict'
const {TheScope} = require('the-scope')
const {TheStore} = require('the-store')
async function tryExample () {
class FlgScope extends TheScope {
static get initialState () {
return false
}
static get reducerFactories () {
return {
toggle (value) {
return (state) => typeof value === 'undefined' ? !state : value
}
}
}
}
const store = new TheStore()
store.load(FlgScope, 'flg')
store.flg.toggle(true)
console.log(store.flg.state) // -> true
}
tryExample().catch((err) => console.error(err))
API Guide
License
This software is released under the MIT License.
Links
3.1.0
5 years ago
3.0.3
5 years ago
3.0.2
5 years ago
3.0.1
5 years ago
3.0.0
5 years ago
2.2.4
5 years ago
2.2.3
5 years ago
2.2.2
6 years ago
2.2.1
6 years ago
2.2.0
6 years ago
2.1.13
6 years ago
2.1.12
6 years ago
2.1.11
6 years ago
2.1.10
6 years ago
2.1.9
6 years ago
2.1.8
6 years ago
2.1.7
6 years ago
2.1.6
6 years ago
2.1.5
6 years ago
2.1.4
6 years ago
2.1.3
6 years ago
2.1.2
6 years ago
2.1.1
6 years ago
2.1.0
6 years ago
2.0.3
6 years ago
2.0.2
6 years ago
2.0.1
6 years ago
2.0.0
6 years ago
1.8.11
6 years ago
1.8.10
6 years ago
1.8.9
6 years ago
1.8.8
6 years ago
1.8.7
6 years ago
1.8.6
7 years ago
1.8.5
7 years ago
1.8.4
7 years ago
1.8.3
7 years ago
1.8.2
7 years ago
1.8.1
7 years ago
1.8.0
7 years ago
1.7.4
7 years ago
1.7.3
7 years ago
1.7.2
7 years ago
1.7.0
7 years ago
1.6.1
7 years ago
1.6.0
7 years ago
1.5.1
7 years ago
1.5.0
7 years ago
1.4.1
7 years ago
1.4.0
7 years ago
1.3.2
7 years ago
1.3.1
7 years ago
1.3.0
7 years ago
1.2.1
7 years ago
1.2.0
7 years ago
1.1.0
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago