@open-pioneer/reactivity 0.1.0 → 2.3.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 (3) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +14 -0
  3. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @open-pioneer/reactivity
2
2
 
3
+ ## 2.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2fbaaa0: Use normal `dependencies` instead of `peerDependencies`. Peer dependencies have some usability issues (and bugs) when used at scale.
8
+
9
+ ## 2.2.0
10
+
11
+ ### Patch Changes
12
+
13
+ - 39dad46: Switch to a new versioning strategy.
14
+ From now on, packages released by this repository share a common version number.
15
+
3
16
  ## 0.1.0
4
17
 
5
18
  ### Minor Changes
package/README.md CHANGED
@@ -77,6 +77,20 @@ export class Model {
77
77
  }
78
78
  ```
79
79
 
80
+ #### Rendering a single reactive value
81
+
82
+ If you have a single signal at hand, there is no need to use the more complex `useReactiveSnapshot` hook.
83
+ You can use the more primitive `useReactiveValue` hook instead:
84
+
85
+ ```jsx
86
+ import { useReactiveValue } from "@open-pioneer/reactivity";
87
+
88
+ function YourComponent({ signal }) {
89
+ const value = useReactiveValue(signal); // Subscribes to `signal.value` and re-renders on changes.
90
+ return <div>{value}</div>;
91
+ }
92
+ ```
93
+
80
94
  More details are available in this package's API documentation and the [README of @conterra/reactivity-core](https://www.npmjs.com/package/@conterra/reactivity-core).
81
95
 
82
96
  ### ESLint configuration
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@open-pioneer/reactivity",
4
- "version": "0.1.0",
4
+ "version": "2.3.0",
5
5
  "description": "Provides integration for the reactivity API.",
6
6
  "keywords": [
7
7
  "open-pioneer-trails"
@@ -13,9 +13,9 @@
13
13
  "url": "https://github.com/open-pioneer/trails-core-packages",
14
14
  "directory": "src/packages/reactivity"
15
15
  },
16
- "peerDependencies": {
16
+ "dependencies": {
17
17
  "react": "^18.3.1",
18
- "@conterra/reactivity-core": "^0.4.0"
18
+ "@conterra/reactivity-core": "^0.4.2"
19
19
  },
20
20
  "exports": {
21
21
  "./package.json": "./package.json",