@nice-code/state 0.4.9 → 0.4.10
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/build/index.js +3 -0
- package/build/react/index.js +3 -0
- package/build/types/core/Store.d.ts +1 -0
- package/package.json +1 -1
package/build/index.js
CHANGED
package/build/react/index.js
CHANGED
|
@@ -124,6 +124,9 @@ class Store {
|
|
|
124
124
|
this.currentState = initialState;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
+
get state() {
|
|
128
|
+
return Object.freeze(this.currentState);
|
|
129
|
+
}
|
|
127
130
|
_setInternalOptions({ ssr, reactionCreators = [] }) {
|
|
128
131
|
this.ssr = ssr;
|
|
129
132
|
this.reactionCreators = reactionCreators;
|
|
@@ -55,6 +55,7 @@ export declare class Store<S extends object = object> {
|
|
|
55
55
|
private reactions;
|
|
56
56
|
private clientSubscriptions;
|
|
57
57
|
constructor(initialState: S | (() => S));
|
|
58
|
+
get state(): S;
|
|
58
59
|
/**
|
|
59
60
|
* Returns the raw state object contained within this store at this moment.
|
|
60
61
|
*
|