re-frame brings a data-oriented, event-driven architecture to ClojureScript UIs on top of Reagent and React. Events are causal; views stay purely reactive.
Overview
re-frame organizes front-end state around an event queue, subscriptions, and effect handlers instead of scattering side effects inside components. Views render from subscription data while events describe what should happen when users act or when data arrives.
The model scales to large single-page applications and has been used in production codebases with tens of thousands of lines. It relies on ClojureScript tooling and the wider Clojure community for builds and editor support.
Reagent supplies the React layer, but re-frame limits React to the view role. Registries for events, subscriptions, and effects give explicit extension points, with a stable core API and optional macros that capture source metadata in development.
Documentation covers debugging and instrumentation, including tracing, validation, and dry-run dispatch helpers introduced in recent releases.
Key features
- Event-driven app architecture
- Pure reactive view functions
- Subscription-based derived state
- Effect and event handler registries
- Reagent and React integration
- Debugging and trace tooling
- Mature production track record
- MIT-licensed core library
Use cases
- Large ClojureScript web applications
- Teams standardizing front-end state flow
- SPAs needing predictable data derivation
- Internal dashboards in Clojure shops
- Migrating legacy React views gradually