Skip to content
This repository has been archived by the owner on Jun 21, 2021. It is now read-only.

theSherwood/sine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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