@lynx-js/react-signals 0.0.1 → 0.0.2

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 +14 -1
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # `@lynx-js/react-signals`
2
2
 
3
- Thread-aware Preact Signals integration for ReactLynx.
3
+ Thread-aware [Preact Signals](https://preactjs.com/blog/introducing-signals/)
4
+ integration for ReactLynx.
4
5
 
5
6
  ```tsx
6
7
  import { signal, useSignal } from '@lynx-js/react-signals';
@@ -8,3 +9,15 @@ import { signal, useSignal } from '@lynx-js/react-signals';
8
9
 
9
10
  The ReactLynx build keeps Signals reactive on the background thread and uses
10
11
  static values during main-thread first-screen rendering.
12
+
13
+ ## Reading Signals in JSX
14
+
15
+ ReactLynx does not currently support consuming a `Signal` directly in JSX. Read
16
+ its value through `.value` instead:
17
+
18
+ ```tsx
19
+ <text>Value: {count.value}</text>;
20
+ ```
21
+
22
+ Reading `signal.value` while rendering a component subscribes that component to
23
+ the Signal. When the value changes, the subscribed component re-renders.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/react-signals",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Thread-aware Preact Signals integration for ReactLynx.",
5
5
  "keywords": [
6
6
  "lynx",
@@ -37,12 +37,12 @@
37
37
  "@preact/signals-core": "^1.14.4"
38
38
  },
39
39
  "devDependencies": {
40
- "@rslib/core": "1.0.0-beta.1",
40
+ "@rslib/core": "1.0.0-beta.3",
41
41
  "preact": "npm:@lynx-js/internal-preact@10.29.1-20260519060144-e6da44c",
42
- "@lynx-js/react": "0.124.0"
42
+ "@lynx-js/react": "0.125.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "@lynx-js/react": "^0.123.0 || ^0.124.0",
45
+ "@lynx-js/react": "^0.123.0 || ^0.124.0 || ^0.125.0",
46
46
  "preact": "*"
47
47
  },
48
48
  "engines": {