Liking cljdoc? Tell your friends :D

sine

A port of Sinuous to ClojureScript

Clojars Project

WORK IN PROGRESS

Rationale

Rather than wrapping React as Reagent does, sine is a port of a smaller, faster, simpler alternative: Sinuous.

Sinuous, and by extension sine, lean far more heavily into the reactive paradigm than React. Reactive updates are fine-grained and at the sub-component level.

Examples

If you have any experience with Reagent, most of this should look moderately familiar.

(defn counter [{:keys [initial]}]
  (let [c (s/atom (or initial 0))]
    (html
     [:div "Count: " c " "
      [:button {:onclick #(swap! c inc)} "Inc"]])))

Acknowledgements

Big shout out to the incomparable Wesley Luyten for Sinuous, without which, sine would not exist

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close