Fork me on GitHub
#re-frame
<
2019-04-07
>
jkrasnay14:04:00

Hi all. I’m building a largish web UI in re-frame and I’d like to replicate something like in Vue where each component contains its own styles. I’m thinking of having each component namespace just register its styles in a central ratom as it’s loaded, then using that ratom to render an inline <style> element. One thing I’m a little worried about is performance, as presumably the <style> element would re-render for each new namespace that is loaded. Is this a reasonable approach? Can someone suggest a better way?

rutledgepaulv22:04:49

https://github.com/Jarzka/stylefy takes a similar approach but handles efficient change of the style elements i think

jkrasnay01:04:04

Hey @U5RCSJ6BB that’s pretty cool. Thanks.

adam18:04:06

Hi guys, I a little confused about "domino" 3, I can't find the code in this sample: https://github.com/Day8/re-frame/blob/master/examples/simple/src/simple/core.cljs Does re-frame take care of it or it's the job of the developer to write its code?