@lomray/react-mobx-manager 4.3.0-beta.1 → 4.3.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -1
- package/package.json +1 -1
- package/types.d.ts +6 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<img src="./logo.png" alt="Mobx stores manager logo" width="250" height="253">
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Clean React components. Encapsulated business logic. No state-tree pain.
|
|
8
8
|
|
|
9
9
|
It is built for apps that want explicit store ownership, SSR support, persistence, lifecycle cleanup and development tooling without forcing everything into one global state tree.
|
|
10
10
|
|
|
@@ -26,6 +26,19 @@ It is built for apps that want explicit store ownership, SSR support, persistenc
|
|
|
26
26
|
- Best-effort HMR
|
|
27
27
|
- And many other nice things 😎
|
|
28
28
|
|
|
29
|
+
<p align="center">
|
|
30
|
+
<img src="https://sonarcloud.io/api/project_badges/measure?project=Lomray-Software_react-mobx-manager&metric=reliability_rating" alt="reliability">
|
|
31
|
+
<img src="https://sonarcloud.io/api/project_badges/measure?project=Lomray-Software_react-mobx-manager&metric=security_rating" alt="Security Rating">
|
|
32
|
+
<img src="https://sonarcloud.io/api/project_badges/measure?project=Lomray-Software_react-mobx-manager&metric=sqale_rating" alt="Maintainability Rating">
|
|
33
|
+
<img src="https://sonarcloud.io/api/project_badges/measure?project=Lomray-Software_react-mobx-manager&metric=vulnerabilities" alt="Vulnerabilities">
|
|
34
|
+
<img src="https://sonarcloud.io/api/project_badges/measure?project=Lomray-Software_react-mobx-manager&metric=bugs" alt="Bugs">
|
|
35
|
+
<img src="https://sonarcloud.io/api/project_badges/measure?project=Lomray-Software_react-mobx-manager&metric=ncloc" alt="Lines of Code">
|
|
36
|
+
<img src="https://sonarcloud.io/api/project_badges/measure?project=Lomray-Software_react-mobx-manager&metric=coverage" alt="code coverage">
|
|
37
|
+
<img src="https://img.shields.io/bundlephobia/minzip/@lomray/react-mobx-manager" alt="size">
|
|
38
|
+
<img src="https://img.shields.io/npm/l/@lomray/react-mobx-manager" alt="size">
|
|
39
|
+
<img src="https://img.shields.io/npm/v/@lomray/react-mobx-manager?label=semantic%20release&logo=semantic-release" alt="semantic version">
|
|
40
|
+
</p>
|
|
41
|
+
|
|
29
42
|
## Install
|
|
30
43
|
|
|
31
44
|
```bash
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -34,6 +34,10 @@ interface IStore extends IStoreLifecycle {
|
|
|
34
34
|
isGlobal?: boolean;
|
|
35
35
|
toJSON?: () => Record<string, any>;
|
|
36
36
|
}
|
|
37
|
+
interface IRelativeStore extends IStore {
|
|
38
|
+
}
|
|
39
|
+
interface IGlobalStore extends IStore {
|
|
40
|
+
}
|
|
37
41
|
interface IStorePersisted extends IStore {
|
|
38
42
|
libStorageOptions?: IPersistOptions;
|
|
39
43
|
addOnChangeListener?: (store: IStorePersisted, manager: Manager) => (() => void) | undefined;
|
|
@@ -85,7 +89,7 @@ interface IManagerOptions {
|
|
|
85
89
|
*/
|
|
86
90
|
failedCreationStrategy?: 'none' | 'dummy' | 'empty';
|
|
87
91
|
}
|
|
88
|
-
type TAnyStore = IStore | IStorePersisted;
|
|
92
|
+
type TAnyStore = IStore | IRelativeStore | IGlobalStore | IStorePersisted;
|
|
89
93
|
type TStores = {
|
|
90
94
|
[storeKey: string]: TAnyStore;
|
|
91
95
|
};
|
|
@@ -140,4 +144,4 @@ interface IPersistOptions {
|
|
|
140
144
|
};
|
|
141
145
|
isNotExported?: boolean;
|
|
142
146
|
}
|
|
143
|
-
export { IWindowManager, IConstructorParams, IStoreLifecycle, IStore, IStorePersisted, TInitStore, IConstructableStore, IStoreConfig, TStoreDefinition, TMapStores, IManagerParams, TWakeup, IStorage, IManagerOptions, TAnyStore, TStores, ClassReturnType, StoresType, IStoreParams, IWithStoreOptions, IMobxManagerEvents, IGroupedStores, IPersistOptions };
|
|
147
|
+
export { IWindowManager, IConstructorParams, IStoreLifecycle, IStore, IRelativeStore, IGlobalStore, IStorePersisted, TInitStore, IConstructableStore, IStoreConfig, TStoreDefinition, TMapStores, IManagerParams, TWakeup, IStorage, IManagerOptions, TAnyStore, TStores, ClassReturnType, StoresType, IStoreParams, IWithStoreOptions, IMobxManagerEvents, IGroupedStores, IPersistOptions };
|