explaingit

day8/re-frame

5,530ClojureAudience · developerComplexity · 4/5LicenseSetup · hard

TLDR

re-frame is a mature ClojureScript framework for building single-page web apps using one-way data flow, where all app state lives in one central place and views update automatically.

Mindmap

mindmap
  root((repo))
    What it does
      Single-page apps
      One-way data flow
      Central state store
    Tech Stack
      ClojureScript
      React via Reagent
    Use Cases
      SPA development
      Large frontends
    Audience
      Clojure developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a production single-page web app in ClojureScript with predictable, centralized state management.

USE CASE 2

Manage large frontend codebases (40,000+ lines) where state complexity would otherwise become unmanageable.

USE CASE 3

Use React for rendering while keeping all application logic in a clean, event-driven Clojure layer.

Tech stack

ClojureClojureScriptReactReagent

Getting it running

Difficulty · hard Time to first run · 1h+

Requires the full Clojure/ClojureScript toolchain (JVM plus Leiningen or deps.edn) and working knowledge of Clojure syntax.

MIT license, use freely for any purpose, including commercial projects, with no restrictions beyond keeping the copyright notice.

In plain English

re-frame is a framework for building web applications in ClojureScript, which is a dialect of Clojure that compiles to JavaScript so it can run in a browser. It is primarily aimed at developers building single-page applications, which are web apps that load once and update their content dynamically without reloading the page. The framework has been around since 2014 and describes itself as mature and stable. The README notes it has been used by small startups as well as organizations with hundreds of developers, and has powered production codebases of 40,000 lines or more. The authors make a point of highlighting this longevity as an advantage, contrasting it with the frequent churn of new JavaScript tools and patterns. At its core, re-frame is built around a one-way data flow model. Application state lives in one central place. Events trigger changes to that state, and views are purely reactive, meaning they only display what the state contains rather than managing logic themselves. This approach keeps the code organized and predictable, especially as an application grows. The framework uses React under the hood through another library called Reagent, but it treats React as just the layer responsible for rendering visuals, not as the organizer of application logic. The project is released under the MIT license. Documentation lives on an external site rather than in the repository itself. A Slack channel exists for community support. The README also mentions a diagnostic and debugging guide for developers who want to inspect application behavior during development, including tools for tracing events and validating subscriptions. This is a developer tool intended for people writing ClojureScript. It is not an end-user application.

Copy-paste prompts

Prompt 1
Set up a new re-frame project with a working counter example showing how events, subscriptions, and views connect.
Prompt 2
Show me how to structure re-frame events and subscriptions for a multi-step form with validation and error states.
Prompt 3
How do I use re-frame's tracing tools to debug exactly which events fire when a user clicks a button in my app?
Open on GitHub → Explain another repo

← day8 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.