{"id":13609372,"url":"https://github.com/pitch-io/uix","last_synced_at":"2025-04-12T20:31:48.179Z","repository":{"id":37013845,"uuid":"402790508","full_name":"pitch-io/uix","owner":"pitch-io","description":"Idiomatic ClojureScript interface to modern React.js","archived":false,"fork":true,"pushed_at":"2025-04-07T10:12:06.000Z","size":3762,"stargazers_count":445,"open_issues_count":2,"forks_count":26,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-11T02:59:28.527Z","etag":null,"topics":["clojure","clojurescript","react"],"latest_commit_sha":null,"homepage":"https://uix-cljs.dev","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"roman01la/uix","license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pitch-io.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"roman01la","patreon":"roman01la"}},"created_at":"2021-09-03T14:05:56.000Z","updated_at":"2025-04-08T03:00:26.000Z","dependencies_parsed_at":"2023-10-17T10:26:15.715Z","dependency_job_id":null,"html_url":"https://github.com/pitch-io/uix","commit_stats":{"total_commits":715,"total_committers":26,"mean_commits":27.5,"dds":"0.15804195804195809","last_synced_commit":"bf6d5914eb994856b53b2a5e384a4093a7cc16fc"},"previous_names":[],"tags_count":293,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pitch-io%2Fuix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pitch-io%2Fuix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pitch-io%2Fuix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pitch-io%2Fuix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pitch-io","download_url":"https://codeload.github.com/pitch-io/uix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248333602,"owners_count":21086200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojure","clojurescript","react"],"created_at":"2024-08-01T19:01:34.418Z","updated_at":"2025-04-12T20:31:48.172Z","avatar_url":"https://github.com/pitch-io.png","language":"Clojure","funding_links":["https://github.com/sponsors/roman01la","https://patreon.com/roman01la","https://buymeacoffee.com/romanliutikov"],"categories":["Clojure"],"sub_categories":[],"readme":"\u003cimg src=\"logo.png\" width=\"125\" /\u003e\n\n_Idiomatic ClojureScript interface to modern React.js_\n\n\u003e “UIx eliminates the learning curve for React developers new to ClojureScript, allowing them to write familiar patterns seamlessly.” – Misha Karpenko, Pitch\n\n\u003e “UIx allows us to leverage the modern React ecosystem to efficiently build ClojureScript apps.” – Juho Teperi, Metosin\n\n\u003e “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\n\n[![CircleCI](https://circleci.com/gh/pitch-io/uix.svg?style=svg)](https://circleci.com/gh/pitch-io/uix)\n[![Clojars Project](https://img.shields.io/clojars/v/com.pitch/uix.core.svg)](https://clojars.org/com.pitch/uix.core)\n[![Clojars Project](https://img.shields.io/clojars/v/com.pitch/uix.dom.svg)](https://clojars.org/com.pitch/uix.dom)\n\n- API compatibility: React v19.0.0\n- Discuss at [#uix on Clojurians Slack](https://clojurians.slack.com/archives/CNMR41NKB)\n- Try it out in the [playground](https://studio.learn-modern-clojurescript.com/p/default-uix)\n- [A slide deck explaining UIx and migration path from Reagent](https://pitch.com/public/821ed924-6fe6-4ce7-9d75-a63f1ee3c61f)\n- [Talk about UIx at London Clojurians meetup](https://www.youtube.com/watch?v=4vgrLHsD0-I)\n- [\"The State of Frontend\" by Alexander Davis](https://www.youtube.com/watch?v=fT28NeZtaAg)\n- [ClojureStream podcast: E94 UIx with Roman Liutikov](https://soundcloud.com/clojurestream/e94-uix-with-roman-liutikov)\n\n## Installation\n\n```\nnpm install react@19.0.0 react-dom@19.0.0 --save-dev\n```\n\n```clj\n{:deps {com.pitch/uix.core {:mvn/version \"1.4.3\"}\n        com.pitch/uix.dom {:mvn/version \"1.4.3\"}}}\n```\n\n### How to start a new project with UIx\n\n- Run `npx create-uix-app@latest my-app` to scaffold a new project\n- Clone starter template manually from [pitch-io/uix-starter](https://github.com/pitch-io/uix-starter)\n- Use fullstack starter project from Metosin [metosin/example-project](https://github.com/metosin/example-project)\n- Template project of a web app hosted on Cloudflare with REST API served from SQLite [roman01la/uix-cloudflare-template](https://github.com/roman01la/uix-cloudflare-template)\n\n## Usage\n\n```clj\n(ns my.app\n  (:require [uix.core :refer [defui $]]\n            [uix.dom]))\n\n(defui button [{:keys [on-click children]}]\n  ($ :button.btn {:on-click on-click}\n    children))\n\n(defui app []\n  (let [[state set-state!] (uix.core/use-state 0)]\n    ($ :\u003c\u003e\n      ($ button {:on-click #(set-state! dec)} \"-\")\n      ($ :span state)\n      ($ button {:on-click #(set-state! inc)} \"+\"))))\n\n(defonce root\n  (uix.dom/create-root (js/document.getElementById \"root\")))\n\n(uix.dom/render-root ($ app) root)\n```\n\n## Docs\n\n- [What is UIx?](docs/what-is-uix.md)\n- [Components](docs/components.md)\n- [Elements](docs/elements.md)\n- [Hooks](docs/hooks.md)\n- [State](docs/state.md)\n- [Effects](docs/effects.md)\n- [Props validation](docs/props-validation.md)\n  - [Compile-time props validation](docs/props-validation.md#compile-time-props-validation)\n- [Interop with React](docs/interop-with-react.md)\n- [Interop with Reagent](docs/interop-with-reagent.md)\n- [Code-splitting and React.lazy](docs/code-splitting.md)\n- [Migrating from Reagent](docs/migrating-from-reagent.md)\n- [Server-side rendering](docs/server-side-rendering.md)\n- [Hot reloading](docs/hot-reloading.md)\n- [React DevTools](docs/react-devtools.md)\n- [Code linting](docs/code-linting.md)\n- [Differences from Reagent](docs/differences-from-reagent.md)\n- [Testing](docs/testing.md)\n  - [End to end testing](docs/testing.md#end-to-end-testing)\n  - [Component testing](docs/testing.md#component-testing)\n  - [Hooks testing](docs/testing.md#hooks-testing)\n- [Utilities](docs/utilities.md)\n- [Examples](/core/dev/uix/examples.cljs)\n- [Internals](docs/internals.md)\n- Other render targets\n  - [React Native](/docs/react-native.md)\n  - [React Three Fiber](/docs/react-three-fiber.md)\n- [Getting help from ChatGPT](/docs/chat-gpt.md)\n\n## Recommended libraries\n\n- Routing\n  - [reitit](https://github.com/metosin/reitit), [example](https://uix-cljs.dev/recipes/routing)\n  - [TanStack Router](https://tanstack.com/router/latest)\n- Global state management\n  - [re-frame](https://day8.github.io/re-frame/), [example](https://github.com/pitch-io/uix/blob/master/docs/interop-with-reagent.md#syncing-with-ratoms-and-re-frame)\n  - [refx](https://github.com/ferdinand-beyer/refx), [example](https://github.com/ferdinand-beyer/refx/tree/main/examples/uix)\n  - [si-frame](https://github.com/metosin/si-frame), [examples](https://github.com/metosin/si-frame/tree/uix-examples/examples)\n- Data validation\n  - clojure.spec (supported by [compile-time props validation](https://github.com/pitch-io/uix/blob/master/docs/props-validation.md#compile-time-props-validation))\n  - [malli](https://github.com/metosin/malli)\n- Data fetching (_unless using routing library with built-in data fetching_)\n  - [TanStack Query v4](https://tanstack.com/query/v4/), (v5 doesn't work with Closure Compiler)\n  - [SWR](https://swr.vercel.app/)\n- Async code\n  - [shadow.cljs.modern/js-await](https://clojureverse.org/t/promise-handling-in-cljs-using-js-await/8998)\n  - [promesa](https://github.com/funcool/promesa)\n- UI component libraries\n  - [shadcn/ui](https://ui.shadcn.com/)\n  - [daisyUI](https://daisyui.com/)\n  - [Material UI](https://mui.com/)\n- Styling\n  - [Tailwind CSS](https://tailwindcss.com/)\n- Icons\n  - [Heroicons](https://heroicons.com/)\n  - [Font Awesome](https://fontawesome.com/)\n- Forms\n  - [React Hook Form](https://react-hook-form.com/)\n  - [Formik](https://formik.org/)\n- Internationalization\n  - [react-i18next](https://react.i18next.com/)\n\n## Who's using UIx?\n\n- [Pitch](https://pitch.com/)\n- [Pitch iOS app](https://apps.apple.com/us/app/pitch-collaborate-on-decks/id1551335606?platform=iphone)\n- [Cognician](https://info.cognician.com/)\n- [Multiply](https://multiply.co/)\n- [Totcal](https://totcal.com/)\n- [ClojureScript Studio](https://studio.learn-modern-clojurescript.com/)\n- [Ogres, virtual tabletop](https://ogres.app/)\n- [ShipClojure](https://www.shipclojure.com/)\n- [Metosin](https://www.metosin.fi/en)\n\n## Contributing\n\nThere are several ways how you can contribute to the project:\n\n- Improve documentation: cover missing pieces, add code examples\n- Add, improve docstrings\n- Propose and implement improvements and new features\n- File and fix bugs\n- Increase test coverage\n\n## Support\n\nYou can support this project via [Github Sponsors](https://github.com/sponsors/roman01la) or [Buy Me a Coffee](https://buymeacoffee.com/romanliutikov).\n\n## Testing\n\n```\nscripts/test\n```\n\n_Note: to ensure you're using the right Node.js version, you can use [nvm](https://github.com/nvm-sh/nvm) and run `nvm use`\nonce in the directory. Otherwise the Node.js version you use is in the `.nvmrc` file. See nvm repo for more documentation._\n\n## Thanks to\n\n- [UIx v1](https://github.com/roman01la/uix) for initial set of ideas and learnings\n- [Helix](https://github.com/lilactown/helix) for even more ideas\n- [Pitch](https://github.com/pitch-io) for sponsoring initial development and dogfooding the work\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpitch-io%2Fuix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpitch-io%2Fuix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpitch-io%2Fuix/lists"}