Upgrading to 2.0
For the new features, see What's new in Reagent 2.0.
Note: You can also keep using
reagent.domand React 18 with Reagent 2.0. Reagent is being tested against both React 18 and 19.
1. Update React npm packages to 19.3.1
npm i react@19.3.1 react-dom@19.3.1
Note: React is no longer available as a UMD module, so the Cljsjs packages can't be updated to React 19.
2. Start using reagent.dom.client API
Replace reagent.dom/render use with the new calls:
(ns example.core
(:require [reagent.dom.client :as rdomc]))
(defn view []
[:div "Hello world"])
(defonce root (rdomc/create-root (.getElementById js/document "app")))
(defn ^:export run []
(rdomc/render root [view]))
Reviewed 2026-11-16 · Edit this page on GitHub