Reagent is a ClojureScript interface to React that lets developers write React components using plain ClojureScript functions.
Reagent solves the problem of bridging ClojureScript and React by providing a functional, Lisp-friendly abstraction over React's component model. Instead of JSX, it uses Hiccup-like markup—a ClojureScript data structure syntax for describing UI. Components are written as simple functions that return markup, and state is managed through Reagent's atom implementation. When an atom is dereferenced within a component, that component automatically re-renders when the atom's value changes. For more complex lifecycle needs, developers can use React's lifecycle callbacks or attach metadata to component functions, but the common case requires no explicit lifecycle management.
Reagent suits teams already committed to ClojureScript who want to leverage functional programming patterns in their frontend code. It works with React and other renderers, and can use React from npm or older cljsjs packages. The tool's performance characteristics benefit from ClojureScript's immutability semantics, allowing aggressive use of React's shouldComponentUpdate optimization to skip unnecessary renders. Developers should expect to learn Hiccup syntax and Reagent's atom model, but the learning curve is shallow for those familiar with ClojureScript.
The project maintains active documentation with tutorials, API references, and a news section. Community discussion happens in dedicated Slack channels. The codebase includes examples demonstrating common patterns and use cases. Development activity shows ongoing maintenance and updates to keep pace with React versions, including support for recent React releases while maintaining compatibility with older versions where needed.