re-natal/resources/cljs/handlers.cljs
Artur Girenko a4a8d09fe7 Support loading of static images using approach introduced in RN 0.14
- Used macro to generate js/require for prod compilation and {:uri http://localhost:8080/*} for dev builds.
- Rearranged sources to be able to support dev and prod profiles
2015-11-28 16:20:39 +01:00

15 lines
337 B
Clojure

(ns $PROJECT_NAME_HYPHENATED$.handlers
(:require
[re-frame.core :refer [register-handler path trim-v after dispatch]]))
(def app-db {:greeting "Hello Clojure in iOS and Android!"})
(register-handler
:initialize-db
(fn [_ _]
app-db))
(register-handler
:set-greeting
(fn [db [_ value]]
(assoc db :greeting value)))