use re-frame 0.8.0 in reagent6 template
This commit is contained in:
parent
a61dc5d0d5
commit
e52b9cd4fd
|
@ -51,10 +51,10 @@ interfaceConf =
|
|||
sources:
|
||||
ios: ["core.cljs"]
|
||||
android: ["core.cljs"]
|
||||
common: ["handlers.cljs", "subs.cljs", "db.cljs"]
|
||||
common: ["events.cljs", "subs.cljs", "db.cljs"]
|
||||
other: [["reagent_dom.cljs","reagent/dom.cljs"], ["reagent_dom_server.cljs","reagent/dom/server.cljs"]]
|
||||
deps: ['[reagent "0.6.0-rc" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server]]'
|
||||
'[re-frame "0.7.0"]']
|
||||
'[re-frame "0.8.0-alpha9"]']
|
||||
shims: ["cljsjs.react", "cljsjs.react.dom", "cljsjs.react.dom.server"]
|
||||
sampleCommandNs: '(in-ns \'$PROJECT_NAME_HYPHENATED$.ios.core)'
|
||||
sampleCommand: '(dispatch [:set-greeting "Hello Native World!"])'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
(ns $PROJECT_NAME_HYPHENATED$.$PLATFORM$.core
|
||||
(:require [reagent.core :as r :refer [atom]]
|
||||
[re-frame.core :refer [subscribe dispatch dispatch-sync]]
|
||||
[$PROJECT_NAME_HYPHENATED$.handlers]
|
||||
[$PROJECT_NAME_HYPHENATED$.events]
|
||||
[$PROJECT_NAME_HYPHENATED$.subs]))
|
||||
|
||||
(def ReactNative (js/require "react-native"))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
(ns $PROJECT_NAME_HYPHENATED$.handlers
|
||||
(ns $PROJECT_NAME_HYPHENATED$.events
|
||||
(:require
|
||||
[re-frame.core :refer [register-handler after]]
|
||||
[re-frame.core :refer [reg-event after]]
|
||||
[cljs.spec :as s]
|
||||
[$PROJECT_NAME_HYPHENATED$.db :as db :refer [app-db]]))
|
||||
|
||||
|
@ -22,13 +22,13 @@
|
|||
|
||||
;; -- Handlers --------------------------------------------------------------
|
||||
|
||||
(register-handler
|
||||
(reg-event
|
||||
:initialize-db
|
||||
validate-spec-mw
|
||||
(fn [_ _]
|
||||
app-db))
|
||||
|
||||
(register-handler
|
||||
(reg-event
|
||||
:set-greeting
|
||||
validate-spec-mw
|
||||
(fn [db [_ value]]
|
|
@ -1,9 +1,7 @@
|
|||
(ns $PROJECT_NAME_HYPHENATED$.subs
|
||||
(:require-macros [reagent.ratom :refer [reaction]])
|
||||
(:require [re-frame.core :refer [register-sub]]))
|
||||
(:require [re-frame.core :refer [reg-sub]]))
|
||||
|
||||
(register-sub
|
||||
(reg-sub
|
||||
:get-greeting
|
||||
(fn [db _]
|
||||
(reaction
|
||||
(get @db :greeting))))
|
||||
(:greeting db)))
|
Loading…
Reference in New Issue