Datastar
ascent-datastar is the protocol core; DOM-free and platform-neutral. Incoming
patch-signals map onto ascent's reactive primitive: a typed signal delta becomes Source.set,
and fine-grained boundaries repaint. Focus and caret stay put; no idiomorph required.
SignalStore
Declare each signal with store.squawk(name, init) (or store.source for writable two-way
bindings). Patches for unknown names are logged no-ops; decode failures retain the prior value.
{
for
store <- SignalStore.make()
count <- store.squawk("count", 0)
_ <- store.route(SignalPatch.Put("count", Json.Num(7), onlyIfMissing = false))
cur <- count.get
yield cur
}7Modules
| Artifact | Role |
|---|---|
ascent-datastar | Protocol + SignalStore (JVM / JS / Native) |
ascent-datastar-js | Browser: EventSource → store / DOM, action fetch |
ascent-datastar-http | Server: AscentDatastar over zio-http datastar SDK |
See Datastar HTTP for SSE routes and Hybrid regions
for serverRegion + patchRegion.
{
E.p(
"Client apps depend on ",
E.code("ascent-datastar-js"),
"; servers on ",
E.code("ascent-datastar-http"),
".",
)
}Client apps depend on ascent-datastar-js; servers on ascent-datastar-http.