This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-16
Channels
- # admin-announcements (94)
- # aws (6)
- # beginners (8)
- # boot (303)
- # cider (5)
- # cljsrn (25)
- # clojure (82)
- # clojure-art (28)
- # clojure-chicago (2)
- # clojure-dev (2)
- # clojure-france (1)
- # clojure-japan (1)
- # clojure-my (1)
- # clojure-russia (78)
- # clojurescript (21)
- # clojurex (3)
- # dirac (1)
- # events (3)
- # funcool (5)
- # hoplon (12)
- # jobs (1)
- # ldnclj (2)
- # off-topic (49)
- # om (207)
- # proton (3)
- # re-frame (24)
- # reagent (45)
- # spacemacs (1)
- # yada (48)
@magomimmo: I used the boot setup from your tutorlai series 1-4
https://github.com/magomimmo/modern-cljs/blob/master/doc/second-edition/tutorial-01.md
@escherize: re:
- looks really great. How do you do it - is there some source??
definately some wonky hacks in there... like a vector of atoms for player-names @[email protected]
BTW the whole http://www.clojurescript.io is reagent on re-framoids 😄
@escherize: yes, I know, the domina
stuff is for beginners, in the next few tutorials I’ll introduce core.async
and reactive stuff as well. In the meantime take a look at the 16th tutorial about a more advanced boot
setup...https://github.com/magomimmo/modern-cljs/blob/master/doc/second-edition/tutorial-16.md
That's interesting stuff @magomimmo - I'll have to pick your series back up 😉
hello all! how to make event on change r/atom? I have global state in map like this (def app-state (reagent/atom {:index-page {:conn-number 0} :clock-page {:current-time 0} :current-page :index-page})) Some functions can change :current-page value to :index-page or :clock-page. I want event handler that if :current-change is changed then call some fn
thanx!
@escherize: planning to make a playable Settlers of Catan app?
@jaen, no -- I was just evaluating semantic ui for fun. I like to build dicerollers for Catan. I should dig into some more of their js components.
I've used the dropdown so far and it mostly works, the only issue I have is it seems the option values have to be strings.
Real React components would certainly better, but it seems like a reasonable stopgap solution to just wrap them, since the docs at least say they are meant to work with React easily.
I havn't done much, but it seems to me that component-did-mount fits perfectly with the setup code. just a bit awkward to target the current component.
Hmm, maybe there's a way to do that automatically with, say for a dropdown, using :
{:reagent-render (fn [] ,,,) ;;<-- dropdown markup
:component-did-mount #(.dropdown (r/dom-node %))}
It needs a few more things, like being able to map the string values to original values (so you don't get string back) but otherwise it's pretty serviceable.
Yeah, it does seem pretty natural; like I mentioned they seem to have taken integration with React into account when writing those components - http://semantic-ui.com/introduction/integrations.html#managing-lifecycle
You still end up with the jQuery dependency; but for initial prototyping I guess that's not too bad - you can always rewrite those components into pure React later, when you know what you need.
Well, (reagent/dom-node component)
already selects the DOM node. (js/$ ...)
is there just to wrap it into the jQuery DOM node wrapper. Since all semantic-ui components are written as jQuery plugins you have to wrap it.
What I mean is you could just re-use the styling and write everything by hand. Sort of like what re-com guys did to select2.
IIRC their dropdown uses select2's styling, but has it's own implementation in Clojurescript and reagent.