@open-pioneer/reactivity 4.9.0-dev.20261029090037 → 4.9.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.
- package/CHANGELOG.md +22 -22
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @open-pioneer/reactivity
|
|
2
2
|
|
|
3
|
-
## 4.9.0
|
|
3
|
+
## 4.9.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
- 4e76893: Update Chakra UI to 3.34.0
|
|
42
42
|
- 19b26dc: Allow configuration of dispatch timing in `useReactiveSnapshot` and `useReactive`.
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
This is intended as a fix for https://github.com/open-pioneer/trails-core-packages/issues/125.
|
|
45
45
|
|
|
46
46
|
## 4.4.0
|
|
47
47
|
|
|
@@ -96,13 +96,13 @@
|
|
|
96
96
|
### Major Changes
|
|
97
97
|
|
|
98
98
|
- 9477e54: Update dependencies
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
- React 19
|
|
100
|
+
- Vite 6
|
|
101
|
+
- FormatJS 3
|
|
102
|
+
- Open Pioneer Build Tools
|
|
103
|
+
- ...
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
For more details, see https://github.com/open-pioneer/trails-core-packages/pull/81
|
|
106
106
|
|
|
107
107
|
## 2.4.0
|
|
108
108
|
|
|
@@ -129,20 +129,20 @@
|
|
|
129
129
|
|
|
130
130
|
- 5d3aafd: Initial release.
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
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).
|
|
133
|
+
Quick example:
|
|
134
134
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
135
|
+
```tsx
|
|
136
|
+
export function YourComponent({ model }) {
|
|
137
|
+
// model is implemented using the reactivity API
|
|
138
|
+
const fullName = useReactiveSnapshot(() => {
|
|
139
|
+
return `${model.firstName} ${model.lastName}`;
|
|
140
|
+
}, [model]);
|
|
141
141
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
// Name is automatically kept up-to-date.
|
|
143
|
+
return <div>Hello {fullName}</div>;
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
146
|
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
The reactivity API is not directly used in any trails packages at this time.
|
|
148
|
+
However, moving forward, most packages will use the reactivity API as _the_ common reactivity system.
|