Idiomatic ClojureScript interface to modern React.js
“UIx eliminates the learning curve for React developers new to ClojureScript, allowing them to write familiar patterns seamlessly.” – Misha Karpenko, Pitch
“UIx allows us to leverage the modern React ecosystem to efficiently build ClojureScript apps.” – Juho Teperi, Metosin
“UIx offers a seamless React integration, making code more efficient with powerful component composition, hooks, and customizable linting for enforcing best practices.” – Chris Etheridge, Cognician
npm install react@19.0.0 react-dom@19.0.0 --save-dev
{:deps {com.pitch/uix.core {:mvn/version "1.4.0"}
com.pitch/uix.dom {:mvn/version "1.4.0"}}}
npx create-uix-app@latest my-app
to scaffold a new project(ns my.app
(:require [uix.core :refer [defui $]]
[uix.dom]))
(defui button [{:keys [on-click children]}]
($ :button.btn {:on-click on-click}
children))
(defui app []
(let [[state set-state!] (uix.core/use-state 0)]
($ :<>
($ button {:on-click #(set-state! dec)} "-")
($ :span state)
($ button {:on-click #(set-state! inc)} "+"))))
(defonce root
(uix.dom/create-root (js/document.getElementById "root")))
(uix.dom/render-root ($ app) root)
There are several ways how you can contribute to the project:
You can support this project via Github Sponsors or Buy Me a Coffee.
scripts/test
Note: to ensure you're using the right Node.js version, you can use nvm and run nvm use
once in the directory. Otherwise the Node.js version you use is in the .nvmrc
file. See nvm repo for more documentation.
Can you improve this documentation? These fine people already did:
roman01la, Roman Liutikov, DjebbZ, Vincent Cantin, Ovi Stoica, Brandon Stubbs, Karlis Lauva & den1kEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close