Upgrading from v5 to v6

v6 is a new engine: native tagged templates (minifier-proof), fine-grained signals, contracts, and complete destroy semantics. The shape stays recognizably lemonade (a function, states, one template), and every v5 pattern has a precise new home. Previous versions remain documented under /docs/v5.

The map

v5v6
return render => render…“return html…“ (tag renamed, no wrapper)
lemonade.render(Comp, root)mount(Comp, root)
this.prop / {{self.prop}}const prop = state(…) + ${prop}
onload(fn) / :readyonMount(fn) (return a cleanup) / ref="${fn}"
self.onchange(prop, o, n)state(v, (val, old) => …) per state
:loop="self.rows"${() => rows.value.map(r => html)}
:render="${cond}"${() => cond.value && html}
:bind="self.name"bind="${name}" (elements) / bind() tool (components)
lemonade.set/get/dispatch (Sugar)store() + actions, or expose/use()
lemonade.set(k, fn, true) persistencestore(initial, 'storage-key')
setComponents({ Card }) + <Card/>same, or embed by value: <${Card} />
lm-path / setPath formsform() with $get/$set
HTML strings in slotsescaped by default; unsafe(html) for trusted markup
self.refresh('prop') / refresh()state.touch() after in-place mutation
createWebComponent(name, fn)same, or contract-driven: createWebComponent(Comp)
per-plugin react.js wrappersone generic adaptReact(Comp)

What was removed on purpose

The mutable this/self bag, {{…}} token expressions, inline-string event handlers and the Function() evaluator (CSP), attribute auto-casting, and the view.toString() template recovery. Each removal closes a class of silent failures; the contracts layer restores typed coercion and interface introspection on declared terms.

What is new with no v5 equivalent

Contracts (component, contract, verify), touch()/batch() for big-data mutation, subscribe()/peek() interop, the test harness, stable error codes, and dev/production builds with build-time dead-code elimination.