@isograph/react-disposable-state 0.0.0-main-850a41dc → 0.0.0-main-83363083
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/dist/ParentCache.js +2 -0
- package/package.json +2 -2
- package/src/ParentCache.ts +2 -0
package/dist/ParentCache.js
CHANGED
@@ -21,6 +21,8 @@ const CacheItem_1 = require("./CacheItem");
|
|
21
21
|
* be called
|
22
22
|
*/
|
23
23
|
class ParentCache {
|
24
|
+
// TODO pass an onEmpty function, which can e.g. remove this ParentCache
|
25
|
+
// from some parent object.
|
24
26
|
constructor(factory) {
|
25
27
|
this.__cacheItem = null;
|
26
28
|
this.__factory = factory;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@isograph/react-disposable-state",
|
3
|
-
"version": "0.0.0-main-
|
3
|
+
"version": "0.0.0-main-83363083",
|
4
4
|
"description": "Primitives for managing disposable state in React",
|
5
5
|
"homepage": "https://isograph.dev",
|
6
6
|
"main": "dist/index.js",
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"prepack": "yarn run compile"
|
18
18
|
},
|
19
19
|
"dependencies": {
|
20
|
-
"@isograph/disposable-types": "0.0.0-main-
|
20
|
+
"@isograph/disposable-types": "0.0.0-main-83363083",
|
21
21
|
"react": "^18.2.0"
|
22
22
|
},
|
23
23
|
"devDependencies": {
|
package/src/ParentCache.ts
CHANGED
@@ -28,6 +28,8 @@ export class ParentCache<T> {
|
|
28
28
|
private __cacheItem: CacheItem<T> | null = null;
|
29
29
|
private readonly __factory: Factory<T>;
|
30
30
|
|
31
|
+
// TODO pass an onEmpty function, which can e.g. remove this ParentCache
|
32
|
+
// from some parent object.
|
31
33
|
constructor(factory: Factory<T>) {
|
32
34
|
this.__factory = factory;
|
33
35
|
}
|