@webqit/observer 3.8.9 → 3.8.11
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/README.md +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
Observe and intercept operations on arbitrary JavaScript objects and arrays using a utility-first, general-purpose reactivity API!
|
|
14
|
+
Observe and intercept operations on arbitrary JavaScript objects and arrays using a utility-first, general-purpose reactivity API!
|
|
15
|
+
|
|
16
|
+
This API re-explores the unique design of the retired [Object.observe()](https://web.dev/es7-observe/) API and unifies that with the rest of JavaScript's metaprogramming APIs: `Proxies`, `Reflect`, `Object`!
|
|
15
17
|
|
|
16
18
|
The Observer API comes as one little API for all things _object observability_. (Only `~5.8KiB min|zip`)
|
|
17
19
|
|
|
@@ -30,7 +32,7 @@ Observer.deleteProperty(state, 'oldProp');
|
|
|
30
32
|
```
|
|
31
33
|
|
|
32
34
|
> [!TIP]
|
|
33
|
-
> Reactivity is anchored on its programmtic APIs like `.set()`, `.deleteProperty()`, but
|
|
35
|
+
> Reactivity is anchored on its programmtic APIs like `.set()`, `.deleteProperty()`, but you also get reactivity over literal JavaScript operations like `obj.prop = value`, `delete obj.prop` — by means of the `accessorize()` and `proxy()` methods covered just ahead.
|
|
34
36
|
>
|
|
35
37
|
> For full-fledged Imperative Reactive Programming, you may want to see the [Quantum JS](https://github.com/webqit/quantum-js) project.
|
|
36
38
|
|
|
@@ -138,7 +140,6 @@ const controller = Observer.observe(user, (mutations) => {
|
|
|
138
140
|
});
|
|
139
141
|
});
|
|
140
142
|
|
|
141
|
-
// Make changes using programmatic APIs
|
|
142
143
|
Observer.set(user, 'name', 'Jane');
|
|
143
144
|
Observer.set(user, 'age', 26);
|
|
144
145
|
|