mirror of
https://github.com/status-im/re-natal.git
synced 2025-01-21 01:49:22 +00:00
15 lines
337 B
Plaintext
15 lines
337 B
Plaintext
|
(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)))
|