This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-05
Channels
- # beginners (3)
- # boot (205)
- # cider (41)
- # clojars (1)
- # clojure (76)
- # clojure-colombia (1)
- # clojure-dusseldorf (3)
- # clojure-russia (314)
- # clojure-sg (1)
- # clojurebridge (1)
- # clojurescript (115)
- # css (2)
- # cursive (5)
- # editors (2)
- # funcool (2)
- # hoplon (18)
- # jobs (62)
- # jobs-discuss (28)
- # ldnclj (1)
- # leiningen (10)
- # mount (9)
- # off-topic (4)
- # om (93)
- # parinfer (10)
- # proton (1)
- # re-frame (19)
- # ring-swagger (18)
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 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
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: dash-to-camel
https://github.com/reagent-project/reagent/blob/master/src/reagent/impl/util.cljs
@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: https://github.com/reagent-project/reagent/blob/master/src/reagent/impl/component.cljs#L215-L218
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 https://github.com/Day8/re-frame/wiki/Debugging ? 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