Citrus for Rum

Have simple re-frame like state management facilities for building web apps with Rum for Clojure and ClojureScript while leveraging its API – Citrus (by Roman Liutikov).

From its documentation:


  • Decoupled application state in a single atom
  • No global state, everything lives in Reconciler instance
  • A notion of a controller to keep application domains separate
  • Reactive queries
  • Side-effects are described as data
  • Async batched updates for better performance
  • Server-side rendering with convenient state hydration

How it works

With Citrus you build everything around a well known architecture pattern in modern SPA development:

  • Model application state (with reconciler)
  • Dispatch events (with dispatch!, dispatch-sync!, broadcast! and broadcast-sync!)
  • Handle events (with :controllers functions)
  • Handle side effects (with :effect-handlers functions)
  • Query state reactively (with subscription, rum/react and rum/reactive)
  • Render (automatic & efficient ! profit +1)

RealWorld example appl

There is a cljs-rum-realworld-example-app on GitHub.