@proscom/prostore-react
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -15,2 +15,3 @@ /// <reference types="react" /> | ||
promises: Set<Promise<any>>; | ||
disabled: boolean; | ||
constructor({ isServer, initialStates }: IProstoreSsrManagerParams); | ||
@@ -23,2 +24,3 @@ registerPromise(promise: Promise<any>): void; | ||
getStates(): IStates; | ||
setDisabled(value: boolean): void; | ||
} |
@@ -10,2 +10,3 @@ "use strict"; | ||
this.promises = new Set(); | ||
this.disabled = false; | ||
this.isServer = isServer || false; | ||
@@ -27,5 +28,9 @@ this.states = initialStates || this.states; | ||
getState(key) { | ||
if (this.disabled) | ||
return null; | ||
return this.states[key]; | ||
} | ||
setState(key, value) { | ||
if (this.disabled) | ||
return; | ||
this.states[key] = value; | ||
@@ -36,4 +41,7 @@ } | ||
} | ||
setDisabled(value) { | ||
this.disabled = value; | ||
} | ||
} | ||
exports.ProstoreSsrManager = ProstoreSsrManager; | ||
//# sourceMappingURL=ProstoreSsrContext.js.map |
{ | ||
"name": "@proscom/prostore-react", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "> TODO: description", | ||
@@ -28,3 +28,3 @@ "author": "Andrew Starostin <a.starostin@proscom.ru>", | ||
"dependencies": { | ||
"@proscom/prostore": "^0.0.8" | ||
"@proscom/prostore": "^0.0.9" | ||
}, | ||
@@ -38,3 +38,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "ada92b2fa3334705d3b12590bc7e5fa18a2be0eb" | ||
"gitHead": "c3ef0173786c47df1b29ba06574f958ad91cf416" | ||
} |
@@ -19,2 +19,3 @@ import { createContext } from 'react'; | ||
public promises: Set<Promise<any>> = new Set(); | ||
public disabled: boolean = false; | ||
@@ -42,2 +43,3 @@ constructor({ isServer, initialStates }: IProstoreSsrManagerParams) { | ||
getState(key: string): any { | ||
if (this.disabled) return null; | ||
return this.states[key]; | ||
@@ -47,2 +49,3 @@ } | ||
setState(key: string, value: any) { | ||
if (this.disabled) return; | ||
this.states[key] = value; | ||
@@ -54,2 +57,6 @@ } | ||
} | ||
setDisabled(value: boolean) { | ||
this.disabled = value; | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24689
422
+ Added@proscom/prostore@0.0.9(transitive)
- Removed@proscom/prostore@0.0.8(transitive)
Updated@proscom/prostore@^0.0.9