Fork me on GitHub
#re-frame
<
2019-02-20
>
Nolan00:02:07

the page is completely unresponsive to my "C-h" input instead

danielcompton00:02:46

Will need a repro

danielcompton00:02:05

What happens if you set localstorage manually?

danielcompton00:02:42

Have you ever got the panel to show?

Nolan00:02:36

never got the panel to show

Nolan00:02:57

just checked localstorage in dev tools, there was nothing there

Nolan00:02:46

adding that snippet to localstorage manually did not have an effect

Nolan00:02:15

my steps to reproduce are, have a project with that project.clj file, do cider jack-in or lein fig:build and enter "C-h" after clicking in window

danielcompton00:02:50

Sounds like it is not being initialised properly

danielcompton00:02:45

There should be a div with id #--re-frame-10x-- in your HTML. If that's not there, then it hasn't been initialised yet

Nolan00:02:36

yes, there is no such div in the DOM

Nolan00:02:06

is there a common cause of this uninitialized issue?

danielcompton00:02:22

Hard to say without more info. Is there anything suspicious in the console?

Nolan01:02:30

2019-02-19 18:13:40.648:INFO::nREPL-worker-0: Logging initialized @10037ms
personal-web.core> [Figwheel] Compiling build dev to "target/public/cljs-out/dev-main.js"
[Figwheel] Successfully compiled build dev to "target/public/cljs-out/dev-main.js" in 1.762 seconds.
[Figwheel] Watching paths: ("src/main/cljs") to compile build - dev
[Figwheel] Starting Server at 
[Figwheel] Starting REPL
Prompt will show when REPL connects to evaluation environment (i.e. a REPL hosting webpage)
Figwheel Main Controls:
          (figwheel.main/stop-builds id ...)  ;; stops Figwheel autobuilder for ids
          (figwheel.main/start-builds id ...) ;; starts autobuilder focused on ids
          (figwheel.main/reset)               ;; stops, cleans, reloads config, and starts autobuilder
          (figwheel.main/build-once id ...)   ;; builds source one time
          (figwheel.main/clean id ...)        ;; deletes compiled cljs target files
          (figwheel.main/status)              ;; displays current state of system
Figwheel REPL Controls:
          (figwheel.repl/conns)               ;; displays the current connections
          (figwheel.repl/focus session-name)  ;; choose which session name to focus on
In the cljs.user ns, controls can be called without ns ie. (conns) instead of (figwheel.repl/conns)
    Docs: (doc function-name-here)
    Exit: :cljs/quit
 Results: Stored in vars *1, *2, *3, *e holds last exception object
Opening URL 
To quit, type: :cljs/quit
cljs.user>

Nolan01:02:47

not that i can see

danielcompton01:02:07

Browser console?

Nolan01:02:07

Installing CLJS DevTools 0.9.10 and enabling features :formatters :hints :async

Download the React DevTools for a better development experience: 

[goog.net.WebSocket] Opening the WebSocket on 

[goog.net.WebSocket] WebSocket opened on 

[Figwheel REPL] Session ID: 146fd6fe-42d6-44a3-ba0a-2db2b7db9584

[Figwheel REPL] Session Name: Francisco

Nolan01:02:15

basically that

Nolan20:02:54

hi, i am having another issue, this time related to routing

Nolan20:02:20

i have this component

(defn router
  "handles routing for the app"
  []
  (let [r @(rf/subscribe [:active-panel-name])]
    (.log js/console "router @" r)
    (case r
      :home  home/page
      :page2 [:div "Page 2"]
      :page3 [:div "Page 3"]
      [:div "Page does not exist"])))

Nolan20:02:36

and these subscriptions, to which the above component is subscribed

Nolan20:02:54

(reg-sub
 :active-panel
 (fn [db _]
   (let [result (:active-panel db)]
     (.log js/console "result 1" result)
     result)))

(reg-sub
 :active-panel-name
 :<- [:active-panel]
 (fn [active-panel _]
   (let [result (get-in active-panel [:data :name])]
     (.log js/console "result 2" result)
     result)))

Nolan20:02:55

and in the home page view, i have an <a> tag that links to :page2

Nolan20:02:05

and when i click that <a> tag, the URL in the browser changes, both of the two log statements in the subscriptions fire off, but the log statement in the subscribed component does not fire off

Nolan20:02:37

and indeed the page does not re-render to the :page2 view