bunja 0.0.2 → 0.0.3

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.
Files changed (2) hide show
  1. package/bunja.ts +2 -4
  2. package/package.json +1 -1
package/bunja.ts CHANGED
@@ -1,9 +1,7 @@
1
1
  import * as React from "react";
2
2
 
3
3
  disposePolyfill: {
4
- const S = Symbol as any;
5
- S.dispose ??= Symbol.for("dispose");
6
- S.asyncDispose ??= Symbol.for("asyncDispose");
4
+ (Symbol as any).dispose ??= Symbol("Symbol.dispose");
7
5
  }
8
6
 
9
7
  type Dep<T> = React.Context<T> | Bunja<T>;
@@ -105,7 +103,7 @@ class BunjaInstance<T> extends RefCounter {
105
103
  }
106
104
  [Symbol.dispose]() {
107
105
  delete bunjas[this.biid];
108
- (this.value[Symbol.asyncDispose] ?? this.value[Symbol.dispose])?.();
106
+ this.value[Symbol.dispose]?.();
109
107
  }
110
108
  }
111
109
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunja",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "State Lifetime Manager for React",
5
5
  "main": "bunja.ts",
6
6
  "scripts": {},