Skip to content
jamesmacaulayPublic

About

Elm-style FRP for Clojure and ClojureScript

Resources

Stars

401 stars

Watchers

24 watching

Forks

Latest commit

 

History

224 Commits

Folders and files

Repository files navigation

Zelkova

This project is unmaintained.

Clojars Project

Build Status

Elm-style FRP for Clojure and ClojureScript.

Here's a conference talk with some demos!

Here's a mailing list on Google Groups!

Bullet points

  • signal graphs are static, just like in Elm (why?)
  • core.async is used to wire up running graphs
  • you can run as many signal graphs as you want at the same time
  • graphs can share signal nodes because each signal is just a "recipe" value decoupled from the state of any running graph
  • works in both Clojure and ClojureScript, but ClojureScript is currently better supported with implementations for keyboard, mouse, and window signals (basically straight ports from the Elm libraries)
  • pairs really well with immediate-mode rendering (e.g. React-based systems like Om or Reagent)
  • transducer pipelines!!

What does it look like?

(ns my-app.ui
  (:require [jamesmacaulay.zelkova.signal :as z]
            [jamesmacaulay.zelkova.keyboard :as keyboard]
            [jamesmacaulay.zelkova.mouse :as mouse]))

(def saved-points-signal
  (let [shift-clicks (z/keep-when keyboard/shift mouse/clicks)]
    (->> mouse/position
         (z/sample-on shift-clicks)
         (z/reductions conj #{}))))

(def saved-points-atom
  (z/pipe-to-atom saved-points-signal))

Documentation

The docs.

Examples

License

Copyright © 2014-2015

Distributed under the MIT License.

About

Elm-style FRP for Clojure and ClojureScript

Resources

Stars

401 stars

Watchers

24 watching

Forks

Releases

Packages

Used by

Contributors

Languages