Skip to content

dubiousdavid/dominator

Repository files navigation

Dominator

ClojureScript + Zelkova + Virtual Dom + "The Elm Pattern" = Sane Javascript!

Uses stch-html for representing HTML in ClojureScript.

Features

  • Single flow of events.
  • Use core.async.
  • Use pure functions for updating state and rendering.
  • Minimal learning curve (i.e., easier than Om).

Installation

[com.2tothe8th/dominator "0.4.0"]

Note: You will need to download the compiled vdom.js file to your project directory and reference it in your HTML file.

wget https://raw.githubusercontent.com/dubiousdavid/dominator/master/vdom.js

You will also need to add :externs ["dominator.js"] to the compiler options map if using advanced compilation.

Sample programs

  1. Counter (source)
  2. Wikipedia (source)
  3. Mario (source)

API Documentation

https://dubiousdavid.github.io/dominator/doc/

Example Usage

Overview