HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
reagent-project
reagent
Clojure2015–2024
reagent-project / reagent

reagent

A minimalistic ClojureScript interface to React.js

23Distinct people
23Mentions
0Explicit recommenders
4.9KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A minimalistic ClojureScript interface to React.js

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 11:34:28 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year23 dated mentions

Observed mentions: 2015-03-13 13:02:04 UTC to 2024-05-23 05:38:23 UTC.

012342015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 4 mentions; 2 submissions, 2 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC422
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC202
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC303
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC202
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC202
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC303
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC404
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC202
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
A simple ClojureScript interface to React. Reagent provides a way to write efficient React components using (almost) nothing but plain ClojureScript functions. Detailed intro with live examples News Documentation, latest release Documentation, next release: API docs, Tutorials and FAQ Community discussion and support channels #reagent channel in Clojure Slack Commercial video material Learn Reagent Free, Learn Reagent Pro (Affiliate link, $30 discount) Learn Re-frame Free, Learn Re-frame Pro (Affiliate link, $30 discount) purelyfunctional.tv Lambda Island Videos Usage To use Reagent in an existing project you add this to your dependencies in project.clj: And provide React using npm (when using e.g. Shadow-cljs) npm i react@19.2.3 react-dom@19.2.3 If there is a more recent minor or patch version of React available, it should be safe to use it in your application. If you want to keep using React 18 or older versions, you can also use cljsjs packages to provide React. Reagent isn't tied to only React-dom but should work with other renderers also. Examples Reagent uses Hiccup-like markup instead of JSX. It looks like this: (defn some-component [] [:div [:h3 "I am a component!"] [:p.someclass "I have " [:strong "bold"] [:span {:style {:color "red"}} " and red"] " text."]]) Since version 0.8: The :class attribute also supports collections of classes, and nil values are removed: [:div {:class ["a-class" (when active? "active") "b-class"]}] You can use one component inside another: (defn calling-component [] [:div "Parent component" [some-component]]) And pass properties from one component to another: (defn child [name] [:p "Hi, I am " name]) (defn parent [] [child "Foo Bar"]) You mount the component into the DOM like this: (defn mount-it [] (rd/render [parent] (.-body js/document))) assuming we have imported Reagent like this: (ns example (:require [reagent.core :as r] [reagent.dom :as rd])) State is handled using Reagent's version of atom, like this: (defonce click-count (r/atom 0)) (defn state-ful-with-atom [] [:div {:on-click #(swap! click-count inc)} "I have been clicked " @click-count " times."]) Any component that dereferences a reagent.core/atom will be automatically re-rendered. If you want to do some setting up when the component is first created, the component function can return a new function that will be called to do the actual rendering: (defn timer-component [] (let [seconds-elapsed (r/atom 0)] (fn [] (js/setTimeout #(swap! seconds-elapsed inc) 1000) [:div "Seconds Elapsed: " @seconds-elapsed]))) This way you can avoid using React's lifecycle callbacks like getInitialState and componentWillMount most of the time. But you can still use them if you want to, either using reagent.core/create-class or by attaching meta-data to a component function: (defonce my-html (r/atom "")) (defn plain-component [] [:p "My html is " @my-html]) (def component-with-callback (with-meta plain-component {:component-did-mount (fn [this] (reset! my-html (.-innerHTML (rd/dom-node this))))})) See the examples directory for more examples. Performance React is pretty darn fast, and so is Reagent. It should even be faster than plain old javascript React a lot of the time, since ClojureScript allows us to skip a lot of unnecessary rendering (through judicious use of React's shouldComponentUpdate). The ClojureScript overhead is kept down, thanks to lots of caching. Code size is a little bigger than React.js, but still quite small. The todomvc example clocks in at roughly 79K gzipped, using advanced compilation. About The idea and some of the code for making components atom-like comes from pump. The reactive-atom idea (and some code) comes from reflex. The license is MIT.
Read the full README on GitHub

What Hacker News says

2 sources
This is getting better but unfortunately your best bet is still to read some examples of good open source projects. If you or anyone interested in some good starting places for good Clojure see: - https://github.com/gothinkster/clojurescript-reframe-realworld-example-app for a great webapp example - All of https://github.com/ztellman work but specifically: - https://github.com/ztellman/manifold for more advanced Clojure - https://github.com/reagent-project/reagent for interop with JS and advanced Clojurescript usage
In Clojure at Netflix (2013) [slides]

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.