Reference

Reference

Glossary

The words this guide uses, each in a sentence, with where to read more.

This glossary defines the words this guide uses, in alphabetical order. Each entry is one sentence, with a link to the chapter that explains the idea. The guide uses each term in the same sense every time.

A

Action

A named function of a page, component or store whose body changes state or does other work: action add() { … }, with -> T when it returns a value and -> ! when it may fail (State and reactivity).

api

A declaration that describes a service: its address, how it is reached, and its endpoints, each a typed call (Fetching data).

App shell

The app { } declaration: what every page is drawn inside, with a Router where the current page goes (Pages and routing).

B

Block

The { … } after an element, holding its style, transitions, handlers, slot fills and children, in that order (Elements).

Built-in

An element the language provides, such as Button or Card, which the compiler knows through the registry (Components reference).

C

Case

One value of an enum, written with a dot: .primary, .failed("x") (Types).

Chunk

A page's own script and stylesheet, written to their own files and loaded the first time the page's route shows, when build.split is on (Configuration).

Contract

What an api says of each endpoint — where it is, what it takes, what it answers and how it fails — which every call site, every fake and, with an OpenAPI spec, wf api check are held to (Fetching data).

Component

An element you declare, with typed props, events, slots and parts: component UserCard(…) { … } (Components).

D

Declaration

A top-level statement of a file: page, component, store, theme, app, type, enum, api, middleware, fake, const, data, image, animation or test (Language basics).

Derived value

A value worked out from state and worked out again when what it reads changes: derived total = … (State and reactivity).

Design token

A named value that a theme sets and every built-in reads, written $name in a style block and var(--name) in a stylesheet (Design tokens).

Diagnostic

A finding the compiler reports, with a code such as T05, a severity, a place and, where it is known, a fix; also called a finding (Diagnostics).

E

Effect

Code that runs when its page shows and again when a state it read changes, with a cleanup { } for what it set up (State and reactivity).

Element

Anything a page draws by a capitalised name — a built-in such as Button, or a component of your own (Elements).

Endpoint

One call of an api: a method, a name, its parameters, a path given by at, and its answer, get user(id: String) at "users/{id}" -> User! (Fetching data).

Enum

A type with a fixed set of cases, declared enum Tone { calm, loud } (Types).

Error enum

An enum whose cases name the statuses a service answers with, each with its body — notFound(problem: Problem) on 404 — and one http(error: HttpError) case for every other failure (Fetching data).

Event

Something that happens — a click, a key, or an event a component declares and fires with emit — that a handler answers (Events).

F

Fake

What answers a group's endpoints in a test in place of the network, held to the group's contract: fake OneUser for Backend.users { … } (Testing).

Flag

A word after a dot that sets a Bool prop or picks an enum case: Button("Save").primary.lg (Elements).

H

Handler

Code run when an event happens, written on click { … } (Events).

Hydration

The script taking over a pre-rendered page in place, without drawing it again (Static sites and SPAs).

I

Imperative block

The body of an action, handler or effect, made of statements that do things; the opposite of a render block (Language basics).

L

Layout

A component a page names with layout: to frame it, which draws the page in its default slot (Pages and routing).

Lint

A rule the compiler checks beyond whether the program can work, such as an accessibility rule or an unused-value rule; the lints setting turns a warning off or raises it to an error, and lowers only the few errors that cannot ship a broken page (Configuration).

M

Middleware

A step every request of an api passes through, in the order written: middleware [requestId, bearer(Session.token)], or one the project declares with middleware name(req, next) { … } (Fetching data).

P

Page

A declaration with a path: that the router draws when the address matches it: page Home(path: "/") { … } (Pages and routing).

Part

A sub-element called under its owner's name: Card.Header, Panel.Footer (Components).

Persist

A state kept in the browser's storage across visits: persist scheme = "light" (Stores).

Positional argument

The one value an element takes without a name, such as a button's label or a heading's text (Elements).

Pre-rendered page

The HTML the build writes for a page from everything it can know at build time, shown before any script runs; also called the static paint (Static sites and SPAs).

Project script

A .js file under src/: a plain browser script, linked on every page as written, whose top-level names .wf code calls directly (JavaScript interop).

Prop

A value a component or built-in takes, passed by name — or, for the one marked _, by position (Components).

R

Read

A request whose answer the page shows, as one value in one of three cases: .loading, .failed(e) or .loaded(value, refreshing, stale); a resource holds one (Fetching data).

Registry

The compiler's table of every built-in's props, cases, flags, events, slots and parts, which the checker, the linters, the editor and the reference all read; wf registry --json prints it (Command line).

Render block

The body of a page, component or element, which describes what to show and the state behind it (Language basics).

Resource

A declaration that holds a read: resource rows: [Row] = http.get(…) or resource users = Backend.users.list(), shown by a match on its .loading, .failed(e) and .loaded(v) cases (Fetching data).

Result

What a call that may fail gives: .ok(value) or .err(error), written T! (the error an HttpError) or T ! E, and matched or passed up with try; a call never throws (Types).

Route parameter

A :name segment of a page's path, which the page declares as a typed parameter: page User(path: "/user/:id", id: String) (Pages and routing).

Runtime

The JavaScript at the head of app.js that the compiled pages call, reachable as window.WF (Runtime API).

S

Scope

What owns the effects, timers and connections created inside it — a page, a branch, a list item — and disposes of them when it leaves (State and reactivity).

Signal

A reactive value, which is what a state is underneath: whatever reads it updates when it changes (Runtime API).

Single-page app (SPA)

A build with one HTML shell, whose pages the script swaps without a reload (Static sites and SPAs).

Slot

A place in a component that its caller fills: the default slot (children), a named slot, or a scoped slot that hands values to its fill (Components).

Snapshot

The HTML a test drew, kept under tests/__snapshots__/ and compared on every later run (Testing).

State

A value of a page, component or store that the page shows and that changes: state count = 0 (State and reactivity).

Static build

A build with build.ssg: true, which writes a pre-rendered HTML file for every page (Static sites and SPAs).

Static paint

Another name for the pre-rendered page: the HTML the build writes for a page before any script runs (Static sites and SPAs).

Store

Shared state with actions, built the first time something reads it (Stores).

T

Template engine

WebFluent used from a server, through wf render, Rust or Node, to render a .wf template with JSON data to HTML or PDF (Render a template).

Theme

A theme declaration: the design tokens it changes from the baseline (Styling).

Type

A record declared with type, or any of the types a value can have; every value's type is one the program can name, written or inferred, and the checker holds every use to it (Types).

V

Validate block

A validate x { … } block beside a state, whose rules the control bound to that state shows (Forms).

W

.wfx

A source file whose blocks are written by indentation instead of braces (Language basics).