docs(examples): hide batch internals from UI copy
Replace beginner-facing EffectBatch/slot-effect wording with generated update language while keeping wire-batch types in tests and low-level APIs. req: dx/006 req: examples/003
This commit is contained in:
+7
-7
@@ -143,7 +143,7 @@ pub fn create_card(
|
||||
}
|
||||
```
|
||||
|
||||
HTML submits as usual. Server returns `EffectBatch`. Browser applies DOM ops.
|
||||
HTML submits as usual. Server returns a typed update batch. Browser applies DOM ops.
|
||||
|
||||
---
|
||||
|
||||
@@ -175,7 +175,7 @@ pub fn drag_card(
|
||||
}
|
||||
```
|
||||
|
||||
Zero round-trip. Zero custom JS. Pure Rust → EffectBatch → DOM.
|
||||
Zero round-trip. Zero custom JS. Pure Rust → typed updates → DOM.
|
||||
|
||||
---
|
||||
|
||||
@@ -259,14 +259,14 @@ pub fn user_joined(user: UserPresence) -> impl IntoEffect {
|
||||
}
|
||||
```
|
||||
|
||||
Browser receives raw `EffectBatch` over WebSocket/SSE:
|
||||
Browser receives typed update bytes over WebSocket/SSE:
|
||||
|
||||
```text
|
||||
Op::AppendKeyed(slot=PRESENCE_USER, key=user_id, html=...)
|
||||
Op::RemoveKeyed(slot=PRESENCE_USER, key=user_id)
|
||||
append keyed presence user
|
||||
remove keyed presence user
|
||||
```
|
||||
|
||||
The runtime does not know "presence". It executes ops.
|
||||
The runtime does not know "presence". It executes generated DOM updates.
|
||||
|
||||
---
|
||||
|
||||
@@ -298,7 +298,7 @@ No framework download. No VDOM. No hydration. No game loop.
|
||||
| Concern | React/Vue | htmx+SSR | slhx |
|
||||
|---|---|---|---|
|
||||
| SSR | RSC/Vue SSR | native | native (hemplate) |
|
||||
| 60fps drag | 100ms re-render + React-DnD | custom JS | WASM handler, EffectBatch |
|
||||
| 60fps drag | 100ms re-render + React-DnD | custom JS | WASM handler, typed update |
|
||||
| Optimistic update | useOptimistic | impossible | `board.update` → `SyncEffect::send_patch` |
|
||||
| Offline support | Service Worker + custom | impossible | patch queue in `slhx-sync` |
|
||||
| Conflict resolution | manual / Yjs CRDT | impossible | server-authoritative patch |
|
||||
|
||||
Reference in New Issue
Block a user