Skip to content

Instantly share code, notes, and snippets.

(ns react-components.core
(:require [reagent.core :as reagent :refer [atom]]))
(enable-console-print!)
(defonce app-state
(atom {:text "Hello world!"
:plain {:comment "and I can take props from the atom"}}))
(defn comment-box []
@bensu
bensu / local-state.clj
Created February 27, 2015 10:56
Shows communication of local state between two components using core.async
(ns ^:figwheel-always local-state.core
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]
[cljs.core.async :refer [put! chan <!]]))
(enable-console-print!)
(defonce app-state (atom {}))
@bensu
bensu / no-instrument.clj
Last active August 29, 2015 14:15
Optional Instrumentation for Om components
(ns no-instrument.core
(:require[om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]))
(enable-console-print!)
;; Instrumentation
;; ===============
(defn paint-component