rum

Simple, decomplected, isomorphic HTML UI library for Clojure and ClojureScript | 0.12.8 https://github.com/tonsky/rum/blob/gh-pages/CHANGELOG.md#0128
cmdrdats 2020-09-04T07:16:43.012400Z

so, rum/local is exactly a clojurescript atom that you mix in, since it needs to generate for local scope on will-mount . I reckon the rule should be consistent: if you want your component to react to any state change, use rum/react - just a deref should always be assumed to be wrong (unless you specifically don't care about the reaction/update, that is)

cmdrdats 2020-09-04T07:20:14.012600Z

passing around atoms and cursors, in my experience of rum at least, is completely normal and useful - but that's not really the point here. I'm more saying that the default behaviour of rum/local mixing in an implicit rum/reactive and rum/react for its atom can be unexpected.. - of course, I've worked around it by implementing my own simplified version of rum/local which we'll be using ubiquitously, but I mention it here as something for people to be aware of.

joe-withey 2020-09-04T08:41:31.012800Z

If you look at https://github.com/tonsky/rum/blob/gh-pages/src/rum/core.cljs#L335 It seems to indicate that derefing a rum/local state is fine in the docstring, and that rum/react is intended to be used with rum/reactive

joe-withey 2020-09-04T08:47:11.013100Z

and for rum/react https://github.com/tonsky/rum/blob/gh-pages/src/rum/core.cljs#L407

cmdrdats 2020-09-04T09:13:59.013700Z

yes - I'm saying that the current implementation of rum/local is unexpected. it "works" to just deref, but it's treated as not only a local atom, but also an implicit local rum/reactive - see the duplication: https://github.com/tonsky/rum/blob/gh-pages/src/rum/core.cljs#L353 and https://github.com/tonsky/rum/blob/gh-pages/src/rum/core.cljs#L394 - imo, the rum/local 's single job should be to provide a local component scoped atom that you can change. Its job should not be to also rerender the component if the atom changes.