UIx is an idiomatic ClojureScript interface to modern React. It keeps you close to the React ecosystem while giving you a great Clojure(Script) developer experience: data-first APIs, simple macros for elements and components, and built‑in guard rails.
Quick take: If you know React, you can be productive with UIx in an hour. If you know Clojure(Script), you get React’s rendering model with a friendlier API.
Because UIx is a wrapper library for React, it's recommended to be comfortable with React’s mental model. Start with the official React docs. If you prefer a course, try Epic React or Joy of React.
• Who is this for? React developers exploring ClojureScript, and Clojure devs who want React without JSX.
• Prerequisites: Basic Clojure(Script), Node.js, and familiarity with React hooks and function components.
• Requirements: React 19.2+, shadow-cljs or your preferred CLJS toolchain. See installation and Quick start in the project’s README.md.
• Try it now: Use the in‑browser playground — no setup required.
Modern React (18+) emphasizes function components, hooks, concurrent rendering, and a clarified render/commit model. If you’re coming from class components or older wrappers, read React’s Render and commit for the mental model UIx builds on.
Older wrappers were designed when React relied on class components and lacked proper scheduling/prioritization. They often recreated scheduling layers, exposed class APIs, and optimized for hiccup syntax.
UIx assumes modern React:
Existing wrappers can run on newer React versions, but fully embracing the new model often requires breaking changes. UIx is designed around the current React model, so you can use new features without legacy constraints.
UIx v2 is a rewrite of the original library developed by Roman Liutikov for Pitch. A key goal was to be “React‑native” for JavaScript engineers moving to ClojureScript: familiar concepts, minimal translation layer, and APIs that feel at home in both communities.
An idiomatic, low‑friction interface to React:
$ macro to create elements without JSX, including shorthand for id/class.defui to define components (function components) with simple, explicit props.[] deps, structural equality for deps, atom‑like use-ref).If you prefer a side‑by‑side view, see:
README.md contains a minimal Quick start you can paste into a fresh app.$ returns — a description of UI to render.defui that returns an element tree.:children.uix.dom/create-root and rendered via uix.dom/render-root.use-effect/use-layout-effect.use-state.README.md.If you hit a snag, check the Testing and Code linting pages, or ask in #uix on Clojurians Slack.
Can you improve this documentation? These fine people already did:
Roman Liutikov, roman01la & Shaun MahoodEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |