Fork me on GitHub
#clojurescript
<
2019-04-27
>
i.i.volkov07:04:48

Re-frame Q: any thoughts on functions vs subscriptions? I know subs are more idiomatic, but you can just basically pass around db and get the stuff you need atomically as 'get-in' is so inexpensive in clojure.

mikethompson08:04:10

@i.i.volkov if your problem is simple enough, sure. But as your application gets a little bit larger and more complicated, subscriptions are a useful for a few reasons (1) an efficiency layer ... if rendering depends on some aspect of app-db which hasn't changed then don't re-render (2) moves the computation of "materialised views` away from rendering code, etc.

i.i.volkov09:04:39

Thanks! And in re-frame, can I inherit reactivity? I mean something like view-fn <- plain-boring-fn-inside-view-fn <- my-sub-inside-plain-boring-fn won’t trigger a rerendering of my view-fn that returns hiccup?

lilactown15:04:45

As long as you deref the subscription it will react to changes

sirromdev14:04:35

Hey, coming from a React background I was wondering if there is a clojurescript equivalent to styled-components?

jayvmithani64620:04:36

While we're on the topic, what are the preferred / most well-supported options for styling in the clojurescript community?

fbielejec09:04:39

garden (https://github.com/noprompt/garden) gets traction. What's lacking is a few frameworks (boot, material, semantic) transpiled to garden. Might be a nice antl4r project 🙂