Fork me on GitHub
#re-frame
<
2019-02-04
>
hoopes21:02:55

possibly dumb question - if i update a lot of the db in one event, all of the subscriptions should all change value during the same "tick" (so to speak)? There shouldn't be any render moment where the data is updating one-at-a-time?

Braden Shepherdson22:02:30

updates are "framed", so yes they should all happen together.

Braden Shepherdson22:02:45

with the possible caveat that I think it might happen over two or three frames if there are lots of updates.

Braden Shepherdson22:02:59

but then the intermediate value isn't used to update the UI, if I understand correctly.

Braden Shepherdson22:02:13

tl;dr, you should never see "tearing" in the UI.

Braden Shepherdson22:02:29

that's a great way to cause "cannot read property foo of undefined" and so on.

ag23:02:29

what’s the “idiomatic” way of adding docstrings to re-frame subs and events?

erwinrooijakkers14:02:41

I usually add a comment, but I like oconn’s approach with extracting a function

joelsanchez17:02:55

that's my issue! 😛 still nothing huh...

ag17:02:31

> I like oconn’s approach with extracting a function You mean setting docstring for the function of the sub or an event? That’s okay, but what if the sub takes signals or event interceptors?