Repository navigation
v5.8.0
A state that copies a live value says so, a script's values reach a page,
and the guide shows a project as a desktop app.
Additions
X06: a state that copies a live value once.state clock = now(every: 1.seconds)holds the moment the page opened and never ticks
again, so every «… ago» built from it freezes; the same holds for
viewport,query,hash,theme,networkandupdate. The warning
names it where it is written, and when nothing assigns, binds or changes
the state, the quick fix declares itderived, which follows the live
value. A state the program does change —state tab = query.tab ?? "all"
that a click then sets — is a starting value on purpose and draws
nothing.- Desktop apps, in the guide. Chapter 33
shows a project as a Tauri or an Electron app: the build settings a
desktop needs, setting up each shell, the dev loop, calling the native
side through typed functions in a script undersrc/, events, plugins,
the security policy and packaging. The chapters after it move up one,
to 34–49.
Fixes
- A script's values reach a page. A value a project script declares at
its top level —const VERSION = "1", alet, avar,window.ready = …— compiled to a signal read,_VERSION(), wherever a page or a
component read it: in text, a splice, aderived, aniforshow
condition, an attribute, a handler. Nothing declares_VERSION, so the
page threw as it drew (_VERSION is not defined), andwf checkpassed.
A call to a script's function was right; a function handed on as a value
was not. Every name a script declares is now its own global, read as
itself, unless the page or component declares the same name, whose
state still wins.
Upgrading
Nothing to change. A function written only to get a script's value onto a
page can go back to being the value. A build may now warn X06 on a
state whose first value reads a live one; making it derived is the
fix.
Full Changelog: v5.7.0...v5.8.0