Fork me on GitHub
#reagent
<
2016-02-03
>
yenda00:02:57

np now I have cutting edge version of reframe 😄

richiardiandrea00:02:40

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?

richiardiandrea00:02:16

and I would like to summon @gadfly361 as I am going to use soda-ash as well 😄

gadfly36100:02:00

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

jaen00:02:49

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

gadfly36100:02:51

Also, I should add that soda-ash is only ready for toy apps :)

gadfly36100:02:35

Still have some work until its fleshed out, but hoping that is sooner than later

serce10:02:18

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

serce10:02:20

I think one possible way is to use (reaction @my-ratom)

serce10:02:59

But it seems like I getting a little overhead using this way

jaen10:02:14

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.

jaen10:02:47

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

jaen10:02:19

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.

amrit10:02:52

can anyyone point me to an production level opensource codebase in reagent?

jaen10:02:03

@amrit: I suppose https://github.com/madvas/fractalify/ can qualify; reagent + re-frame. No boot sadly.

mikethompson11:02:03

@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

jaen15:02:55

Does reagent automatically call dispose! on reactions used in a component when it's unmounted?

danielcompton18:02:44

Although it’s more about when reactions no longer have anyone derefing them then anything to do with the component IIRC

jaen18:02:46

How would that work though? I don't think Javascript has any GC hooks?

jaen18:02:54

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.

jaen18:02:30

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.

jaen18:02:33

Ah, -remove-watch! calls it, not the component lifecycle directly.

jcomplex22:02:00

Is there an example of using reagent for a searchable table

mikethompson22:02:31

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

jaen23:02:38

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)

eyelidlessness23:02:06

is there an idiomatic way to briefly highlight an element when its state changes?

eyelidlessness23:02:04

or even a way at all without directly targeting the DOM?

eyelidlessness23:02:26

ended up going with the DOM. simple enough, isolated