webdetta 0.1.232 → 0.1.234

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webdetta",
3
- "version": "0.1.232",
3
+ "version": "0.1.234",
4
4
  "author": "Fedot Kriutchenko <fodyadev@gmail.com>",
5
5
  "description": "",
6
6
  "license": "MIT",
@@ -76,7 +76,6 @@ export class Effect {
76
76
  this.readonly = readonly;
77
77
  if (parent) {
78
78
  this.errorHandler ??= parent.errorHandler;
79
- this.readonly ||= parent.readonly;
80
79
  (parent.children ??= []).push(this);
81
80
  }
82
81
  }
@@ -55,12 +55,14 @@ r.effect = (handler, {
55
55
  handler,
56
56
  errorHandler: onError,
57
57
  tracking: track,
58
- readonly: writes !== undefined ? !writes : parent?.readonly,
58
+ readonly: writes === undefined ? undefined : !writes
59
59
  });
60
60
  if (run) effect.run();
61
61
  return effect;
62
62
  }
63
63
 
64
+ r.untrack = (handler, options) => r.effect(handler, { ...options, track: false });
65
+
64
66
  // Derived
65
67
 
66
68
  r.computed = (func, { initial }={}) => {