This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-07
Channels
- # adventofcode (202)
- # aleph (8)
- # announcements (13)
- # architecture (1)
- # aws (2)
- # beginners (201)
- # boot (1)
- # bristol-clojurians (1)
- # calva (2)
- # cider (23)
- # cljs-dev (22)
- # cljsrn (2)
- # clojure (105)
- # clojure-bangladesh (1)
- # clojure-berlin (8)
- # clojure-dev (104)
- # clojure-europe (3)
- # clojure-italy (5)
- # clojure-losangeles (1)
- # clojure-nl (24)
- # clojure-russia (55)
- # clojure-spec (44)
- # clojure-uk (19)
- # clojurescript (58)
- # component (58)
- # cursive (3)
- # data-science (1)
- # datomic (27)
- # duct (6)
- # events (6)
- # figwheel-main (6)
- # fulcro (15)
- # jobs (3)
- # kaocha (5)
- # luminus (1)
- # music (1)
- # nrepl (2)
- # off-topic (24)
- # onyx (1)
- # pedestal (3)
- # protorepl (8)
- # re-frame (18)
- # reagent (39)
- # reitit (1)
- # remote-jobs (1)
- # ring (15)
- # rum (11)
- # shadow-cljs (5)
- # sql (8)
- # tools-deps (12)
- # vim (7)
Hi, I use component like react-virtualized, react-pose, etc... Is it component like this where you want help ? (not sure to understand what you search, sorry)
@mateus.pimentel.w I haven’t used JSX components in my re-frame, but I found this: http://reagent-project.github.io/docs/master/reagent.core.html#var-reactify-component
Or hmm, that’s going the wrong way, reagent->jsx
Maybe this one? http://reagent-project.github.io/docs/master/reagent.core.html#var-adapt-react-class
when you're developing a full stack app (ring backend api and a re-frame front-end in my case with cider interactivity on both) how do you structure your project directories during development so the re-frame app can be served by the backend locally? side by side with symlinks or something? re-frame inside of the backend directories? something else?
I suppose it depends on what the final production arrangement will be, for which I could also use some idiomatic suggestions. I'm guessing folks may have other options than serving a re-frame site from resources/public on a compojure back-end.
I think I'm going to have other things hitting my backend API (a react native mobile client, for example) if that's a factor.
I simply use two directories: clj and cljs. Server side code and client side code, respectively. Client side follows re-frame guidelines, so events, views and subs namespaces grouped by areas in the app (topics, if you will). Server side is divided into model, apis, services, and utils usually.
And then I have a template.clj which is the index.html served via ring to the browser.
in our case the general division of code is similar to @manuel 's, but we use a monorepo with modules for the high-level divisions (async, db, model, api, streaming, app-core, main-app, onboarding-app) and we have a fair bit of code-sharing between front and back-end, so lots of things are .cljc
and we don't have any clj
/`cljs` directories, just src
and test
in each module
that's helpful... and I also just remembered polylith as something I might think about, which almost sounds a bit like what @mccraigmccraig is doing.
it seems quite similar - we tend to use lein :source-paths
(each module has its own project.clj
) instead of symlinks, but to the same effect - dependency sources get drawn into the same classpath and can be recompiled / reloaded just like it was a single module
I use re-frisk and 10x together -- I like the re-frisk view of the app-db better, but 10x has all that other cool stuff. So far no problems having them both on at the same time.