Skip to content

Commit

Permalink
Improving demo per work sessions
Browse files Browse the repository at this point in the history
[KLARA-17 #time 4h]
  • Loading branch information
Andrew Nguyen committed Oct 23, 2018
1 parent 2133e01 commit d451a59
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
14 changes: 7 additions & 7 deletions src/cljs_react_navigation/re_frame.cljs
Expand Up @@ -58,7 +58,7 @@
action-fn (get reagent/NavigationActionsMap "Navigation/BACK")
action (action-fn (->js {:routeName routeName}))
new-state (@ref-getStateForAction action (->js routing-state))]
(log-console (str " with new state: " new-state))
;(log-console (str " with new state: " new-state))
(assoc app-db :routing (->clj new-state)))))

(reg-sub
Expand Down Expand Up @@ -97,9 +97,9 @@
(init-state root-router init-route-name))]
;(log-console (str "routing-state: " routing-state))
[:> root-router {:navigation
(addNavigationHelpers
(clj->js {:state routing-state
:addListener add-listener
:dispatch (fn [action]
(let [next-state (getStateForAction action routing-state)]
(dispatch [::swap-routing-state next-state])))}))}]))))
(base/addNavigationHelpers
(->js {:state routing-state
:addListener add-listener
:dispatch (fn [action]
(let [next-state (getStateForAction action (->js routing-state))]
(dispatch [::swap-routing-state (->clj next-state)])))}))}]))))
7 changes: 1 addition & 6 deletions test/cljs_react_navigation/core_test.clj
@@ -1,7 +1,2 @@
(ns cljs-react-navigation.core-test
(:require [clojure.test :refer :all]
[cljs-react-navigation.core :refer :all]))

(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
(:require [clojure.test :refer :all]))

0 comments on commit d451a59

Please sign in to comment.