Venus
Signals and components
A signal is state that a view can read. Venus tracks those reads and invalidates the components that depend on a changed value.
Local state
fn $details(label: str): unk {
let $open = false
return col({ gap: 8 }) {
btn(label, on(() => { $open = !$open }))
if $open { text("Additional information") }
}
}
The dollar-prefixed function is a component. Each call site is memoized. Use an explicit key when component identity follows an item in a changing list.
Views are values
A view contains a kind, props and children. Helpers such as col, row, text and btn build those values. Conditional children and loops are ordinary Vulcan control flow.
Interaction state belongs in the tree
Hover, focus, selection and expanded state should be represented in the component tree. on_hover and on_focus report state changes; the state prop lets the stylesheet decorate the resulting state. Do not hide interactive state exclusively in CSS pseudo-classes.
Errors stay visible
Declare an error boundary where errors should appear. report_error sends an error value to the nearest boundary. A boundary that displays a failure is different from ignoring it with an empty fallback.
Keep the host small
Use the host for capabilities the language image cannot perform on its own. Pass structured events into the application, fold them into state, and emit explicit intents for external actions.