Created
June 29, 2012 07:10
-
-
Save murtaza52/3016422 to your computer and use it in GitHub Desktop.
Pubsub example from shoreleave
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns pm.client.models | |
(:require [pm.client.utils :as utils] | |
[shoreleave.pubsubs.simple :as pbus] | |
[shoreleave.client.pubsubs.protocols :as pubsub])) | |
(def proj (atom {:hello 2})) | |
(def bus (pbus/bus)) | |
(pubsub/publishize proj bus) | |
(pubsub/subscribe bus proj #(js/console.log (pr-str %))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment