Skip to content

Instantly share code, notes, and snippets.

@Jared314
Jared314 / core.cljs
Created February 18, 2014 21:05
Om with core.async cleanup
(ns processtest.core
(:require [cljs.core.async :refer [<! >! chan timeout]]
[om.core :as om :include-macros true]
[om.dom :as dom :include-macros true])
(:require-macros [cljs.core.async.macros :refer [go]]))
(defn cell1 [data owner]
(reify
om/IInitState
(init-state [_] {:value 0 :class ""})
@Jared314
Jared314 / core.cljs
Created February 18, 2014 19:11
Om with core.async (1 channel per target)
(ns processtest.core
(:require [cljs.core.async :as async
:refer [<! >! chan put! timeout]]
[om.core :as om :include-macros true]
[om.dom :as dom :include-macros true])
(:require-macros [cljs.core.async.macros :refer [go]]))
(defn cell1 [data owner]
(reify
om/IInitState
@Jared314
Jared314 / core.cljs
Created February 18, 2014 07:44
Om with core.async
(ns processtest.core
(:require [cljs.core.async :as async
:refer [<! >! chan put! timeout]]
[om.core :as om :include-macros true]
[om.dom :as dom :include-macros true])
(:require-macros [cljs.core.async.macros :refer [go]]))
(defn cell1 [data owner]
(reify
om/IInitState
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
#fixednode { background-color: red; color: white; }
#item1 { background-color: blue; color: white; }
</style>
<style type="text/x-pbpl">