<commit_before># inkle

**Note: inkle won't work for you until suck a time as incremental-dom is added to the cljsjs package repository. I have a pull request waiting, and will remove this message as soon as it's merged.**

Easy [Incremental Dom](http://github.com/google/incremental-dom) rendering using [ClojureScript](http://github.com/clojure/clojurescript).

Fast dom updating with a low compiled size. Since Incremental Dom is closure compiler compatible, it adds very little overhead to your clojurescript project. The TODOMVC example is 147kb after compilation, and only 35kb gzipped.

## Examples

inkle's interface is strongly influenced by [Reagent](http://github.com/reagent-project/reagent) - all you need is a simple function which returns a [hiccup-like](https://github.com/weavejester/hiccup) data structure.

```clj
(ns hello-world.core
  (:require [goog.dom :as dom]
            [inkle.core :as inkle]))

(defn hello-world [name]
  [:h1#hello-world
    [:div.title "Hello " name]])

(inkle/renderer (dom/getElement "app") [hello-world "John"])
```

Updating is managed using atoms:

```clj
(ns counter.core
  (:require [goog.dom :as dom]
            [inkle.core :as inkle]))

(defn counter [name]
  (let [count (inkle/iatom 0)]<commit_msg>Fix type<commit_after># inkle

**Note: inkle won't work for you until such a time as incremental-dom is added to the cljsjs package repository. I have a pull request waiting, and will remove this message as soon as it's merged.**

Easy [Incremental Dom](http://github.com/google/incremental-dom) rendering using [ClojureScript](http://github.com/clojure/clojurescript).

Fast dom updating with a low compiled size. Since Incremental Dom is closure compiler compatible, it adds very little overhead to your clojurescript project. The TODOMVC example is 147kb after compilation, and only 35kb gzipped.

## Examples

inkle's interface is strongly influenced by [Reagent](http://github.com/reagent-project/reagent) - all you need is a simple function which returns a [hiccup-like](https://github.com/weavejester/hiccup) data structure.

```clj
(ns hello-world.core
  (:require [goog.dom :as dom]
            [inkle.core :as inkle]))

(defn hello-world [name]
  [:h1#hello-world
    [:div.title "Hello " name]])

(inkle/renderer (dom/getElement "app") [hello-world "John"])
```

Updating is managed using atoms:

```clj
(ns counter.core
  (:require [goog.dom :as dom]
            [inkle.core :as inkle]))

(defn counter [name]
  (let [count (inkle/iatom 0)]
{'fraction_non_alphanumeric': 0.11638102829812674, 'fraction_numerical': 0.005579912315663611, 'mean_word_length': 4.229166666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '157850', 'n_tokens_mistral': 810, 'n_tokens_neox': 759, 'n_words': 286}