Fork me on GitHub
#re-frame
<
2016-01-30
>
richiardiandrea01:01:31

Will I still be able to have the cljs-devtools goodies?

gadfly36104:01:34

@richiardiandrea I haven't played with cljs-devtools yet. I know @mikethompson is a big fan tho, and has probably tried it with the larger apps structure.

gadfly36104:01:05

As an aside, if anyone here wants to help add a cljs-devtools option to re-frame-template that would be awesome!

mikethompson04:01:38

@richiardiandrea: I'm puzzled by the question. There's no relationship between clj-devtools and any particular cljs library or technique. cljs-devtools just means you have a better debugging experience in devtools when you are using cljs.

richiardiandrea04:01:04

Sorry i it wasn't clear, I am talking about the tracer in particular, and the fact that you can track handlers, subs and rerendered views. But I'd better try things before asking :)))

sooheon12:01:18

jaen: What could be the problem when a component is not properly reactive on first page load, but after a cljs-reload, (say triggered by change in the source) it functions properly? Specifically, I’m trying to modify your dropdown render function to be something like this:

:reagent-render
    (fn [{:keys [value]} _]
      (let [value @value]
        [:div.ui.dropdown
         [:h1.ui.header {:style {:margin-bottom "0"}}
          [:div value [:i.dropdown.icon]]]
         [:input {:type "hidden" :name "choice" :value value}]
         [:
          (doall (for [{:keys [value text]} choices]
                   (conj
                    ^{:key (str "choice-" value)}
                    [:div.item {:data-value value}]
                    text)))]]))
So essentially, I want it to look like a header but function as a dropdown.

jaen12:01:17

Hah, interesting; no idea offhand, would have to experiment; something you can share?

sooheon12:01:36

Do you mind looking at the source code?

jaen12:01:01

And what the title is?

sooheon12:01:22

Ah one sec

jaen12:01:45

It probably would be easier for me to understand what's going on if you had it in a repo I could clone and run; unless it's something you can't share then I understand.

sooheon12:01:05

Sure one moment

sooheon12:01:53

I added you as a collaborator, just because I have api keys in there, and didn’t want to make the whole repo public :P

jaen12:01:39

Sure, makes sense. I'm jaen on any of github/bitbucket/gitlab.

sooheon12:01:10

Yep, added, and I’m pushing a snapshot of my work now

sooheon14:01:34

Incase anyone was curious, this turned out not to be a re-frame issue, but with reagent. The result of reagent/wrap wasn’t being properly reactive, and using jaen’s reactive wrapper hack made it work for this case, at least.

darwin14:01:43

@gadfly361: you could implement something like this in your code and cljs-devtools would pick it up: https://github.com/binaryage/pure-frame/blob/master/src/re_frame/frame.cljs#L162-L170

simax9915:01:20

I’m trying to set up my project to use the debugging options described on the re-frame wiki (https://github.com/Day8/re-frame/wiki/Debugging). But I’m getting the following error when I start my Cursive REPL:

Exception in thread "main" clojure.lang.ExceptionInfo: No such namespace: re-frame-tracer.core, could not locate re_frame_tracer/core.cljs, re_frame_tracer/core.cljc, or Closure namespace "re-frame-tracer.core" {:tag :cljs/analysis-error}, compiling:…
 
Any ideas what I’m doing wrong?

simax9915:01:13

Looks like these could be figwheel issues. I’ll try asking in the lein-figwheel channel.