Fresco user guide¶
Fresco is re-frame2's native view layer. Views are Hiccup data, subscription reads are ordinary function calls, and event handlers can remain event vectors. The runtime turns that data into React elements; app-db, events, subscriptions, frames, and the event pipeline remain ordinary re-frame2.
This guide explains the Fresco view model, controlled inputs, forms, routing,
resources, React interop, native components, local UI state, motion/presence,
overlays, SSR, testing, diagnostics, performance, migration, code splitting,
and accessibility. Numbered pages run from
00-installation through
22-accessibility, and the sidebar carries that order —
each chapter leans only on what came before it.
Five lookup surfaces follow the chapters. The API reference carries every public name with the signature it ships with; the Cookbook carries whole recipes you can copy; Troubleshooting starts from a symptom or a complaint id; The escape ladder gives the criteria for going outside the interpreted model and what each rung costs; and the Glossary defines the Fresco-specific terms the chapters use.
Prerequisites¶
You should already understand the re-frame2 basics: events, app-db, subscriptions, effects, and frames. The Core guide owns those concepts. This corpus explains what changes at the view layer and how that layer behaves at its boundaries.
When Fresco fits¶
Use Fresco when you want re-frame2's data-oriented model to continue through the view tree:
- markup remains inspectable Hiccup data
- a view reads subscriptions with
h/subwhere it needs them - common event handlers remain event vectors rather than opaque closures
- a frame remains explicit across rendering, callbacks, testing, and tools
When to use another corpus or adapter¶
Pure business logic and HTTP work with no Fresco view belong in the Core, async, or resources guides.
A Reagent application still using re-frame v1 event shapes should complete the core migration before applying the Fresco migration. A React-first product — hooks throughout the screen and a React component system at the centre — will usually be clearer with the UIx adapter, using Fresco only where its data-first view model is useful.
Status¶
Pre-alpha
Fresco is pre-alpha, and this guide is written against what ships. Every namespace and verb it names is exported today, and a gate reads each verb in every fenced sample against the source that defines it, so a sample here cannot name a spelling the door does not carry. SSR and hydration describes shipped behaviour rather than an intended contract.