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
sova-soars-the-sora 2020-07-08T13:49:30.163400Z

Hi, is it smarter to put every component that has a serverside/clientside definition in a .cljc?

sova-soars-the-sora 2020-07-08T13:50:01.164Z

I have been keeping them separately, cljs and clj but that can become perniciously detail-oriented

2020-07-08T14:39:07.164500Z

Yes, I'd put them into cljc

2020-07-08T14:39:36.165100Z

and have one component definition with reader conditionals, if needed, in the body of a component

2020-07-08T14:40:22.166200Z

(rum/defc component []
  #?(:clj (do-in-clj)
     :cljs (do-in-cljs))
  [:h1 "hello"])

2020-07-08T14:41:09.167100Z

this way you'll have a single unit in a form of a component where you can always find clj and cljs parts of it