Fork me on GitHub
#rum
<
2017-06-17
>
misha10:06:54

is having single rum/local superior in any way (subscriptions management overhead, etc.) over having 2+ of them in the same component?

(rum/defcs Foo < (rum/local false ::bar?) (rum/local "" ::baz) [state] ...)
;;vs.
(rum/defcs Foo < (rum/local {:bar? false :baz ""} ::quux) [state] ...)

martinklepsch10:06:59

@misha rum/local creates one atom and corresponding watch, so if you use it twice you have two atoms and two watches

martinklepsch10:06:31

@misha not sure if that makes a significant real life difference but depends on your usage

misha10:06:01

I am aware of that, but is it actually expensive in any way, or it does not matter even on mobile browsers?

misha10:06:01

on the other hand, single atom is more convenient to persist/pass around, if needed

martinklepsch10:06:12

I guess you’ll need to try

martinklepsch10:06:40

but I doubt there are significant differences in the lower (1-10) amounts of rum/local mixins

misha10:06:21

I guess I'll stick to single local (just to make a decision here), thanks Martin

kauko13:06:58
replied to a thread:

Carry also works with Rum