Fork me on GitHub
#reagent
<
2019-07-19
>
lilactown14:07:34

thanks sogaiu. yeah, I understand the general gist but I’m trying to figure out the how each ratom knows exactly it’s watchers; e.g. how it knows when it’s been “undereferenced”

lilactown14:07:25

trying to read the code and think about it, it must be that the dereferencer knows to call -remove-watch once it realizes it is no longer dereferencing the ratom

Noah Bogart16:07:51

i've been running into a small bit of confusion related to the vector form of functions vs the list form. i'm map-indexed-ing over a sequence, and inside the fn I'm let-binding some things and then calling one of two functions based on the bindings, passing the map into the function call. I had expected that I could use the vector call-form [action-div on-click action], but for some reason those aren't rendered, even tho the map-indexed is wrapped in a [:div. if I change it to the list call-form (action-div on-click action), it works

Noah Bogart16:07:50

in the function action-div, i'm creating a div and putting some stuff in it, no loops and nothing fancy

lilactown16:07:56

I’d have to see the code

lilactown16:07:28

the important thing to remember, is you’re not “calling” the function with a vector but returning a data structure [action-div on-click action] that reagent will call for you later

lilactown16:07:42

weird things can happen if you’re using lazy seqs

Noah Bogart16:07:41

my apologies, seems the issue was between the keyboard and chair 😛