reagent-migration

Rewrites Reagent view code into Fresco, re-frame2's re-frame-native view layer.

49|Updated May 7, 2026
One-click install
npx skills add https://github.com/day8/re-frame2 --skill reagent-migration-day8
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reagent-migration
Source: https://github.com/day8/re-frame2/tree/main/skills/reagent-migration
Command: npx skills add https://github.com/day8/re-frame2 --skill reagent-migration-day8

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Rewriting Reagent hiccup views into re-frame2's Fresco view layer is a judgment-heavy rewrite, not a respelling: subscription derefs, dispatch closures, view-local state, and lifecycle methods all change shape, and a half-converted view fails silently at click time. This Skill guides that migration with a source-text reporter, a tiered rule catalog, and an incremental procedure. ## Core Features & Use Cases - Reporter-first inventory: Runs a JVM codemod that censuses every Reagent API call site and fixes the [:> …] prop dialect at React crossings before any view is touched. - Tiered transformation catalog: Applies mechanical M-tier rewrites directly (deref-drop, dispatch-lifting, key-meta to :key), reasons through D-tier decisions with the author (Form-2 state, Form-3 lifecycle, foreign React), and honestly declines R-tier cases that must stay on Reagent. - Use Case: A team already on re-frame2 wants Fresco for some views. The Skill runs the reporter, converts one closed subtree at a time leaf-to-root citing MIG-NN rule ids, runs the project's compile and test gates after each pass, and holds views using component-did-update on Reagent with a stated reason. ## Quick Start Ask the AI to migrate your Reagent views to Fresco, for example: "Port this Reagent component namespace to h/defview using the reagent-migration skill."

Frequently Asked Questions about reagent-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate Reagent views to Fresco in re-frame2?▼

Run the reagent-to-fresco codemod reporter first to census Reagent API call sites and fix the [:> …] prop dialect, then convert views one closed subtree at a time, leaf to root. Each rewrite cites a MIG-NN rule id, and the project's compile and test gates run after every pass.

Do I need to rewrite Reagent views when moving to re-frame2?▼

No. re-frame2 ships a first-class, actively supported Reagent adapter, so a v1 app swaps the dependency, installs the adapter, and keeps its view code. Rewriting views into Fresco is a separate, optional second step for authors who specifically want Fresco.

What Reagent constructs cannot be migrated to Fresco?▼

Three cases stay on Reagent: the component-did-update prev-props protocol, a frame-pinned reactive read, and Reagent's own component introspection and schedulers. The skill holds those views on Reagent and states the reason rather than forcing a conversion.

Why does a half-migrated Fresco view fail at click time?▼

A leftover #(dispatch …) closure compiles and renders because Fresco passes plain functions to React by identity, but at click time there is no render extent, so ambient dispatch raises :rf.error/no-frame-context. Convert each view whole and grep converted bodies for surviving closures.

How does Fresco handle Reagent Form-2 local state like r/atom?▼

Fresco has no view-local state tier by design. Each r/atom becomes an ownership decision: product state moves to app-db via h/reg-state, draft-and-commit controls use re-frame.fresco.forms/buffered-field, and genuine widget mechanics go to a React island with real hooks.

Can Fresco views use third-party React components?▼

Yes. A one-off crossing keeps the [:> Component …] escape, and a repeated crossing is declared once with h/defhost. Callback contracts are inferred from prop spelling, with a :callbacks override for vendors whose on*-named prop is actually a render prop.