Skip to content
This repository was 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

745ed1f · Dec 29, 2020

History

11 Commits
Jul 18, 2020
Nov 20, 2020
Nov 20, 2020
Nov 18, 2020
Dec 29, 2020
Jul 18, 2020
Nov 20, 2020
Nov 23, 2020
Dec 29, 2020

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