3.1.1 • Published 2 years ago
mst-tools v3.1.1
Toolset for efficient development with MobX-State-Tree
Install
npm install mobx mobx-state-tree mst-tools
Usage
For a detailed description of all helper functions and wrappers see API
import { types, effect } from "mst-tools"
const model = types.model('ModelName', {
...,
isLoaded: types.flag,
isLoading: types.flag,
})
.effects((self, { isLoading, isLoaded }) => ({
load: effect(
function* () {
self.field = yield self.api.load();
},
{ isLoading, isLoaded }
),
}));
const store = model.create({});
await store.load();
Benchmark
The toolkit adds additional code to implement new features. Welcome - if you are willing to pay for the speed of development time to create a model.
npm run benchmark
---
Test perf (model creation):
[mobx-state-tree] x 7,843 ops/sec ±0.28% (92 runs sampled)
[mst-tools] x 7,141 ops/sec ±0.31% (93 runs sampled)
# Fastest is [mobx-state-tree]
---
OS: Ubuntu 21.10 x86_64
DE: GNOME 40.5
Terminal: tilix
CPU: Intel i9-9900 (16) @ 5.000GHz
GPU: NVIDIA GeForce RTX 2070
Memory: 32019MiB
API
Click the tools names for complete docs.
...in process
3.1.1
2 years ago
3.1.0
2 years ago
3.0.2
2 years ago
3.0.1
2 years ago
3.0.0
2 years ago
2.3.10
2 years ago
2.3.9
2 years ago
2.3.8
2 years ago
2.3.7
2 years ago
2.3.5
2 years ago
2.3.4
2 years ago
2.3.3
2 years ago
2.3.2
2 years ago
2.3.1
2 years ago
2.3.0
2 years ago
2.2.2
2 years ago
2.2.1
2 years ago
2.2.0
2 years ago
2.1.2
2 years ago
2.1.1
2 years ago
2.1.0
2 years ago
2.0.0
2 years ago
1.2.0
2 years ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago