@ktjs/router 0.34.3 → 0.36.0

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/README.md +7 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -17,10 +17,14 @@
17
17
 
18
18
  ## Recent Updates
19
19
 
20
- 1. `ref.value` remains the standard read API, and it can also replace the whole outer value with `ref.value = nextValue`.
21
- 2. `ref.draft` is the deep-mutation entry for literally any objects. Just use `someRef.draft.a = someValue`, and kt.js will add it to microqueue and redraw it on the next tick. Works for `Map`, `Set`, `Array`, `Date` and your custom objects.
20
+ 1. 0.36.x - override 0.35.x. Now refs and computeds have 2 new apis:
21
+ 1. `get(...keys)`: create a `KTSubComputed` object. It is a light version of computed, used to bind values
22
+ 2. `subref(...keys)`: create a `KTSubRef` object. It is a light version of ref, used to bind values and also support two-way binding with `k-model`.
23
+ 2. 0.34.x - `ref.notify()` no-longer has an optional argument.
24
+ 3. 0.33.x - `ref.value` remains the standard read API, and it can also replace the whole outer value with `ref.value = nextValue`.
25
+ 4. 0.33.x - `ref.draft` is the deep-mutation entry for literally any objects. Just use `someRef.draft.a = someValue`, and kt.js will add it to microqueue and redraw it on the next tick. Works for `Map`, `Set`, `Array`, `Date` and your custom objects.
22
26
  1. `ref.draft` itself is **not assignable**.
23
- 3. `addOnChange((newValue, oldValue) => ...)` keeps `oldValue` as the previous reference, not a deep snapshot.
27
+ 5. `addOnChange((newValue, oldValue) => ...)` keeps `oldValue` as the previous reference, not a deep snapshot.
24
28
 
25
29
  ## Community
26
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ktjs/router",
3
- "version": "0.34.3",
3
+ "version": "0.36.0",
4
4
  "description": "Router for kt.js - client-side routing with navigation guards",
5
5
  "description_zh": "kt.js 的路由库,支持前端路由与导航守卫。",
6
6
  "type": "module",