@solidjs/signals 2.0.0-beta.20 → 2.0.0-beta.22

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
@@ -112,7 +112,7 @@ isPending(data); // true while an unrevealed value change is in flight for this
112
112
  latest(data); // last resolved value; follows the not-ready path if no value has resolved yet
113
113
  ```
114
114
 
115
- Use `action()` to coordinate async workflows with the reactive graph:
115
+ Use `action()` for mutations — imperative async workflows whose writes span an async gap. Each invocation runs as a single transaction: every write between yields batches into one atomic update, and nothing commits until the action completes or the next `yield` resolves.
116
116
 
117
117
  ```typescript
118
118
  const save = action(function* (item) {
@@ -120,6 +120,10 @@ const save = action(function* (item) {
120
120
  });
121
121
  ```
122
122
 
123
+ Navigation-shaped updates don't need an action. A plain setter call is enough — reads pull the async, downstream async computeds hold their previous values until new ones are ready, and `isPending`/`latest` expose the in-flight state. Reach for `action` when writes happen *after* async work (pairing with optimistic primitives for tentative state that reverts on failure), not when the async is merely downstream of a synchronous write.
124
+
125
+ Framework-level actions (router form actions, server actions) are specializations of this primitive: the same transactional semantics with form binding, serialization, and submission tracking layered on top.
126
+
123
127
  ## Optimistic Updates
124
128
 
125
129
  Optimistic signals show an immediate value while async work is pending, then automatically revert when it settles: