@open-pioneer/reactivity 4.8.0 → 4.9.0-dev.20260930055642
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 +23 -21
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @open-pioneer/reactivity
|
|
2
2
|
|
|
3
|
+
## 4.9.0-dev.20260930055642
|
|
4
|
+
|
|
3
5
|
## 4.8.0
|
|
4
6
|
|
|
5
7
|
### Minor Changes
|
|
@@ -30,7 +32,7 @@
|
|
|
30
32
|
- 4e76893: Update Chakra UI to 3.34.0
|
|
31
33
|
- 19b26dc: Allow configuration of dispatch timing in `useReactiveSnapshot` and `useReactive`.
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
This is intended as a fix for https://github.com/open-pioneer/trails-core-packages/issues/125.
|
|
34
36
|
|
|
35
37
|
## 4.4.0
|
|
36
38
|
|
|
@@ -85,13 +87,13 @@
|
|
|
85
87
|
### Major Changes
|
|
86
88
|
|
|
87
89
|
- 9477e54: Update dependencies
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
- React 19
|
|
91
|
+
- Vite 6
|
|
92
|
+
- FormatJS 3
|
|
93
|
+
- Open Pioneer Build Tools
|
|
94
|
+
- ...
|
|
93
95
|
|
|
94
|
-
|
|
96
|
+
For more details, see https://github.com/open-pioneer/trails-core-packages/pull/81
|
|
95
97
|
|
|
96
98
|
## 2.4.0
|
|
97
99
|
|
|
@@ -118,20 +120,20 @@
|
|
|
118
120
|
|
|
119
121
|
- 5d3aafd: Initial release.
|
|
120
122
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
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).
|
|
124
|
+
Quick example:
|
|
123
125
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
```tsx
|
|
127
|
+
export function YourComponent({ model }) {
|
|
128
|
+
// model is implemented using the reactivity API
|
|
129
|
+
const fullName = useReactiveSnapshot(() => {
|
|
130
|
+
return `${model.firstName} ${model.lastName}`;
|
|
131
|
+
}, [model]);
|
|
130
132
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
// Name is automatically kept up-to-date.
|
|
134
|
+
return <div>Hello {fullName}</div>;
|
|
135
|
+
}
|
|
136
|
+
```
|
|
135
137
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
+
The reactivity API is not directly used in any trails packages at this time.
|
|
139
|
+
However, moving forward, most packages will use the reactivity API as _the_ common reactivity system.
|