Fork me on GitHub

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 šŸŽ


Should I be searching the 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


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


@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.


auto-focus instead of autoFocus


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


To answer your question: there is no map converting Reagent-y names to JS. Instead, there's a function which does the conversion:


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


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


@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 >>


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


(replying to an earlier message about 0.6 usage here)


@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


Anyone have advice on the setup described in ? I'm afraid I'm not actually getting any trace output in the console.


@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?


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


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