@tilia/react 1.0.0 → 1.1.1-canary.20241223T161043

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 +23 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # Tilia React
2
2
 
3
- Tilia is a simple state management library for "FRP" style programming with React.
3
+ Tilia is a simple state management library for "FRP" style programming with
4
+ React.
4
5
 
5
6
  This package contains the hook for React.
6
7
 
7
- This package is compatible with _TypeScript_ and _ReScript_, you can find the examples for the latter at the end.
8
+ This package is compatible with _TypeScript_ and _ReScript_, you can find the
9
+ examples for the latter at the end.
8
10
 
9
11
  ## Installation
10
12
 
@@ -47,10 +49,12 @@ function Clouds(props: { clouds: MyState["clouds"] }) {
47
49
  }
48
50
  ```
49
51
 
52
+ Note that you can re-insert a tracked object inside the same tree and share
53
+ state and tracking.
54
+
50
55
  # ReScript example
51
56
 
52
57
  ```res
53
- open TiliaCore
54
58
  open JsxEvent.Form
55
59
 
56
60
  type clouds = {
@@ -63,7 +67,7 @@ type state = {
63
67
  }
64
68
 
65
69
  // Create a tracked object or array:
66
- let tree = make({
70
+ let tree = Tilia.make({
67
71
  flowers: "are beautiful",
68
72
  clouds: { morning: "can be pink", evening: "can be orange" },
69
73
  })
@@ -90,3 +94,18 @@ let make(~clouds: clouds) {
90
94
  </div>
91
95
  }
92
96
  ```
97
+
98
+ Please check the documentation for [@tilia/core](../core/README.md) for technical details on how tracking is done.
99
+
100
+ ## Little sandbox examples
101
+
102
+ - [An input field](https://codesandbox.io/p/sandbox/react-ts)
103
+
104
+ ### Changelog
105
+
106
+ - 2024-12-18 **1.2.2** Fix readonly tracking: should not proxy.
107
+ - 2024-12-18 **1.2.1** Fix bug to not track prototype methods.
108
+ - 2024-12-18 **1.2.0** Improve ownKeys watching, notify on key deletion.
109
+ - 2024-12-18 **1.1.1** Fix build issue (rescript was still required)
110
+ - 2024-12-17 **1.1.0** Add support to share tracking between branches.
111
+ - 2024-12-13 **1.0.0** Alpha release.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tilia/react",
3
- "version": "1.0.0",
3
+ "version": "1.1.1-canary.20241223T161043",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -24,6 +24,6 @@
24
24
  "react": "*"
25
25
  },
26
26
  "dependencies": {
27
- "@tilia/core": "^1.0.0"
27
+ "@tilia/core": "1.2.3-canary.20241223T161042"
28
28
  }
29
29
  }