@open-pioneer/reactivity 4.7.0 → 4.7.1-dev-test-snapshot.20260821120534
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/CHANGELOG.md +27 -21
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @open-pioneer/reactivity
|
|
2
2
|
|
|
3
|
+
## 4.7.1-dev-test-snapshot.20260821120534
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7d5283e: Updated dependencies.
|
|
8
|
+
|
|
3
9
|
## 4.7.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -19,7 +25,7 @@
|
|
|
19
25
|
- 4e76893: Update Chakra UI to 3.34.0
|
|
20
26
|
- 19b26dc: Allow configuration of dispatch timing in `useReactiveSnapshot` and `useReactive`.
|
|
21
27
|
|
|
22
|
-
|
|
28
|
+
This is intended as a fix for https://github.com/open-pioneer/trails-core-packages/issues/125.
|
|
23
29
|
|
|
24
30
|
## 4.4.0
|
|
25
31
|
|
|
@@ -74,13 +80,13 @@
|
|
|
74
80
|
### Major Changes
|
|
75
81
|
|
|
76
82
|
- 9477e54: Update dependencies
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
- React 19
|
|
84
|
+
- Vite 6
|
|
85
|
+
- FormatJS 3
|
|
86
|
+
- Open Pioneer Build Tools
|
|
87
|
+
- ...
|
|
82
88
|
|
|
83
|
-
|
|
89
|
+
For more details, see https://github.com/open-pioneer/trails-core-packages/pull/81
|
|
84
90
|
|
|
85
91
|
## 2.4.0
|
|
86
92
|
|
|
@@ -107,20 +113,20 @@
|
|
|
107
113
|
|
|
108
114
|
- 5d3aafd: Initial release.
|
|
109
115
|
|
|
110
|
-
|
|
111
|
-
|
|
116
|
+
You can use the hook `useReactiveSnapshot` to write React components that make use of the reactivity API of [@conterra/reactivity-core](https://www.npmjs.com/package/@conterra/reactivity-core).
|
|
117
|
+
Quick example:
|
|
112
118
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
```tsx
|
|
120
|
+
export function YourComponent({ model }) {
|
|
121
|
+
// model is implemented using the reactivity API
|
|
122
|
+
const fullName = useReactiveSnapshot(() => {
|
|
123
|
+
return `${model.firstName} ${model.lastName}`;
|
|
124
|
+
}, [model]);
|
|
119
125
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
126
|
+
// Name is automatically kept up-to-date.
|
|
127
|
+
return <div>Hello {fullName}</div>;
|
|
128
|
+
}
|
|
129
|
+
```
|
|
124
130
|
|
|
125
|
-
|
|
126
|
-
|
|
131
|
+
The reactivity API is not directly used in any trails packages at this time.
|
|
132
|
+
However, moving forward, most packages will use the reactivity API as _the_ common reactivity system.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/reactivity",
|
|
4
|
-
"version": "4.7.
|
|
4
|
+
"version": "4.7.1-dev-test-snapshot.20260821120534",
|
|
5
5
|
"description": "Provides integration for the reactivity API.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"open-pioneer-trails"
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
"@conterra/reactivity-core": "^0.8.6",
|
|
18
18
|
"react": "^19.2.8"
|
|
19
19
|
},
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"directory": "dist",
|
|
22
|
+
"linkDirectory": false
|
|
23
|
+
},
|
|
20
24
|
"exports": {
|
|
21
25
|
"./package.json": "./package.json",
|
|
22
26
|
".": {
|