fiboui 2.8.1 → 2.8.3

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/README.md CHANGED
@@ -148,12 +148,12 @@ Box()
148
148
  .children(() => [
149
149
  Text(`Count: ${count.value}`),
150
150
  Button('+').onPress(() => {
151
- count.value += 1
151
+ count.change((n) => n + 1)
152
152
  }),
153
153
  ])
154
154
  ```
155
155
 
156
- `.bindSignal` re-assembles. Read `.value` inside a **function child** so updates are live. `` Text(`Total ${todos.$length}`) `` stays live without a function child. Forms and validation: [Form](docs/components/interactive-form.md).
156
+ `.bindSignal` re-assembles. Read `.value` inside a **function child** so updates are live. `.value =`, `.set()`, `.change()`, and `.reset()` all notify the same way. `` Text(`Total ${todos.$length}`) `` stays live without a function child. Forms and validation: [Form](docs/components/interactive-form.md).
157
157
 
158
158
  ```mermaid
159
159
  sequenceDiagram
@@ -162,7 +162,7 @@ sequenceDiagram
162
162
  participant H as onPress
163
163
 
164
164
  UI->>S: .bindSignal(count)
165
- H->>S: count.value += 1
165
+ H->>S: count.change(n => n + 1)
166
166
  S-->>UI: notify subscribers
167
167
  UI->>UI: re-assemble children()
168
168
  ```