This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-03
Channels
- # aatree (5)
- # admin-announcements (52)
- # announcements (1)
- # aws (2)
- # beginners (55)
- # boot (494)
- # braid-chat (17)
- # cider (2)
- # cljsjs (4)
- # cljsrn (8)
- # clojure (157)
- # clojure-austin (6)
- # clojure-czech (7)
- # clojure-denmark (1)
- # clojure-dev (102)
- # clojure-ireland (6)
- # clojure-japan (4)
- # clojure-miami (2)
- # clojure-poland (90)
- # clojure-russia (415)
- # clojurebridge (2)
- # clojurescript (143)
- # core-async (1)
- # datavis (4)
- # datomic (20)
- # devcards (5)
- # dirac (40)
- # emacs (9)
- # events (103)
- # gorilla (1)
- # immutant (122)
- # jobs (3)
- # ldnclj (20)
- # lein-figwheel (1)
- # mount (2)
- # off-topic (22)
- # om (170)
- # onyx (7)
- # overtone (6)
- # parinfer (100)
- # proton (2)
- # re-frame (5)
- # reagent (32)
- # ring-swagger (2)
- # spacemacs (6)
Soo, I would like to use the Semantic API search http://semantic-ui.com/behaviors/api.html But I don't want to use jQuery for selection, what do you guys suggest me to use in a reagent app?
and I would like to summon @gadfly361 as I am going to use soda-ash
as well 😄
@richiardiandrea take a look at my comment to this issue https://github.com/gadfly361/soda-ash/issues/1 ... It redirects you to some logs and an example by @jaen . You'll notice $
is still used, but is selects on reagent's dom-node instead of a class or id.
@richiardiandrea: yeah, you can't run from jQuery since Semantic-UI javascripts are implemented as jQuery plugin, but you can reliably get the dome node to wrap with $
using reagent/dom-node
on the component, as in the sample.
Is there any way to make my ratom immutable? I want to expose my immutable version of ratom from my namespace using function, but I want to prevent it from mutation through swap! and etc...
If you don't need to transform then in any way then I'd just expose them as-is and roll with it, Python's consenting adults style.
Otherwise I'd go with reaction, I suppose; maybe it's a bit of overhead, but if read-only is what you're after then that seems like a sensible choice
Also, they are cached, so this overhead is fully insignificant in face of the fact that you can do (reaction (sort-by :key @dependent))
and expect that to be re-sorted only when dependent
changes.
@amrit: I suppose https://github.com/madvas/fractalify/ can qualify; reagent + re-frame. No boot sadly.
@amrit: Does re-com qualify? We certainly use it in production code (but we're the authors, so clearly biased). https://github.com/Day8/re-com
Does reagent automatically call dispose!
on reactions used in a component when it's unmounted?
@jaen I think so?
Although it’s more about when reactions no longer have anyone derefing them then anything to do with the component IIRC
I figured reagent tracked what reactions were dereferenced and then disposed of those when the component goes away. But honestly can't point at code that would do it.
I'm asking because I added :on-dispose
to my reaction and it doesn't fire; but maybe I'll try to make it simpler first to see if it's not something else.
https://github.com/reagent-project/reagent/blob/master/src/reagent/ratom.cljs#L346-L352
I can also see this - https://github.com/reagent-project/reagent/blob/master/src/reagent/impl/component.cljs#L195
@jaen: @danielcompton Be aware that you are linking to code for v0.6.0-alpha
. Code for the currently stable version (0.5.0 series) does ratom differently, although the result is probably the same (unverified by me).
Thanks for pointing it out; running this version though. Still didn't get around to verifying it with a simple reaction, got sidetracked on the backend; hopefully this actually works like that and it's just me doing something stupid (though fixing that could be hard because magic query parsing macros is magic)
is there an idiomatic way to briefly highlight an element when its state changes?
or even a way at all without directly targeting the DOM?
ended up going with the DOM. simple enough, isolated