Fork me on GitHub
#reagent
<
2018-04-14
>
pesterhazy18:04:15

A Reaction tracks all dereferencings of ratoms during the execution of the render fn

pesterhazy18:04:37

It doesn’t matter where the ratom is declared or if it’s dereferenced in the function body or elsewhere (but before the render fn returns)

pesterhazy18:04:26

It’s all pretty simple to track because of JavaScript’s single threaded nature

tomaas18:04:43

thank @pesterhazy, maybe you know some post on reactions?

pesterhazy18:04:51

I think you’ll need to dig into the source

reefersleep20:04:19

I’m trying to do some interop with react-beautiful-dnd, and I’m almost there. I just have an odd challenge; I need for a React element to be the last element in a [:div] vector which I’m then wrapping in (reagent.core/as-element), that is; (reagent.core/as-element [:div {:my attributes-map} some-content the-React-element)])

reefersleep20:04:26

I’m not getting an error, but I’m not getting the expected behaviour, either. I suspect it’s because I’m trying to convert a hiccup vector which contains a React element, which doesn’t really make sense.

reefersleep20:04:42

I’m trying to figure out what gymnastics I can do to make this happen, though.

reefersleep20:04:39

Anyone have an idea of a direction for me? 🙂