Fork me on GitHub
#om
<
2016-05-09
>
anmonteiro12:05:53

@dnolen: In Om Next, instrument is only ever called for the root component, as opposed to om.core’s instrument which was called for every build down the component tree. is this intentional?

anmonteiro13:05:11

I would expect it to be called whenever we called a factory function

dnolen13:05:17

@anmonteiro: pretty sure I didn’t fully bake instrument at all yet, so probably nothing intentional there

anmonteiro13:05:01

@dnolen: gotcha. I think that’s the only obstacle to fully make it work. Everything else seems to be in place

anmonteiro13:05:20

I noticed it by going over the devcards example

dnolen13:05:22

@anmonteiro: ah, k - yeah if the patch is simple - then def welcome

anmonteiro13:05:50

@dnolen: thx, I’ll see what I can do

ag16:05:24

@dnolen: I’m very new to Om Next, looking through todomvc demo, it seems to me this part doesn’t work https://github.com/swannodette/om-next-demo/blob/master/todomvc/src/cljs/todomvc/core.cljs#L69 basically I can’t add new items. Is this intentional and left unfinished as a learner's exercise, or am I missing something?

anmonteiro16:05:32

@ag: yes that TodoMVC is not fully functional

kendall.buchanan20:05:56

Question, ya’ll, about parent child relationships in om.next: If a child component needs access to a parents’ props, what’s best way to go about it? 1) Access parent via query (e.g. [:answer/id {:question [:question/id]}]), 2) Pass the parent down the chain (e.g. (answer-component {:question …}), or 3) Don’t do it – just pass the parents’ necessary fields (e.g. (answer-component {:question/id 1}). I hope that makes sense...

kendall.buchanan20:05:52

I’ve begun using #1, however, I’m frequently running into situations that remind me of bad situations in React: child components knowing too much about their parents are brittle.

kendall.buchanan20:05:10

I think I’m leaning towards #3… Thoughts?

dimiter23:05:18

Anyone have an idea on how to implement http://api.jquery.com/slidetoggle/ with CLJS/Goog code.

spiralganglion23:05:48

I would use a CSS transition triggered by adding/removing a class (or attribute, if that fits your style better).

spiralganglion23:05:23

If you want to hide the element afterward, you could listen for the transitionend event.

dimiter23:05:31

Ok. Thanks..