{"repo":"reagent-project/reagent","free":true,"listed":false,"github":"https://github.com/reagent-project/reagent","clone":"git clone https://github.com/reagent-project/reagent.git","description":"A minimalistic ClojureScript interface to React.js","language":"Clojure","stars":4885,"topics":["reagent","clojurescript","react","frontend","clojure","hiccup"],"license":"MIT","category":"ui-components","readme_excerpt":"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) 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: Since version 0.8: The :class attribute also supports collections of classes, and nil values are removed: You can use one component inside another: And pass properties from one component to another: You mount the component into the DOM like this: assuming we have imported Reagent like this: State is handled using Reagent's version of atom , like this: Any component that dereferences a reagent.co","default_branch":null,"files":null,"tree":[],"storefront":"/r/reagent-project","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/reagent-project/reagent/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}