Fork me on GitHub
#re-frame
<
2016-03-05
>
fasiha00:03:01

Aha, got it, thanks @mikethompson! After your explanation and a bit more experimentation I can see when a println inside the component prints and when it doesn't. Very very awesome šŸŽ

fasiha00:03:29

Should I be searching the https://github.com/weavejester/hiccup sources for what event listener names to use with re-frame? I.e., onclick -> on-click, dragenter -> on-drag-enter ? I'm getting scared just googling for these translations

fasiha00:03:40

I've been looking for the map converting Clojure-y event names to JS (which are what React expects yeah?) in hiccup, reagent, cljsjs/packages, re-frame, and coming up a little empty

mikethompson08:03:20

@fasiha: Reagent's event handler attributes are lower case and have dashes. on-click insted of onClick and on-mouse-over instead of onMouseMove etc.

mikethompson08:03:46

auto-focus instead of autoFocus

mikethompson08:03:53

I think you get the idea (if I'm telling you what you know already, forgive me, I just wanted to be sure)

mikethompson08:03:40

To answer your question: there is no map converting Reagent-y names to JS. Instead, there's a function which does the conversion: https://github.com/reagent-project/reagent/blob/master/src/reagent/impl/component.cljs#L215-L218

lsenta10:03:19

Hola guys, I've read this very interesting discussion about states machines with re-frame

lsenta10:03:49

Has anyone any experience / feedbacks on implementing a "state chart machine" with re-frame?

fasiha11:03:20

@mikethompson: got it, thanks to @mccraigmccraig's linkā€”thanks! Whew, I feel like a right nitwit for googling all these Clojure-y event names instead of guessing that was the pattern >>

martinklepsch14:03:01

@mikethompson: I've been using re-frame w/ reagent 0.6 and things seem to work just fine. Not doing anything overly complex though.

martinklepsch14:03:16

(replying to an earlier message about 0.6 usage here)

danielcompton18:03:36

@nidu there is a bit more work done by dynamic subscriptions. Take a look at the implementation and you can see the difference. However it's still a very small amount of work. I would probably not use dynamic subscriptions until I needed them though. We've built a very large re-frame app without needing them much at all

amacdougall18:03:48

Anyone have advice on the setup described in https://github.com/Day8/re-frame/wiki/Debugging ? I'm afraid I'm not actually getting any trace output in the console.

nidu20:03:41

@danielcompton: In my understanding you have some top (or near top) level components, which track some id from url and fetch data depending on url for example. This implies using dynamic subscriptions unless you split component into two where simple subscription is created in second (deeper) component because it's recreated on id change. Could you spill some light on you workflow in this case please?

danielcompton20:03:45

Gotcha, we have "pages" in our app that we navigate to, which instantiate new view components. So each view can just focus on the data it needs without worrying about dynamic subscriptions or routing state

nidu20:03:48

Oh. So splitting components like this you can fully avoid dynamic subs?