Fork me on GitHub

Hey guys, what is the proper way to use JSX components with re-frame/reagent ?


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)


Or hmm, that’s going the wrong way, reagent->jsx


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 testin 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


Do people still use re-frisk? What's the preffered event visualization tool? 10x?


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.

👍 4

Yeah, I still use re-frisk for looking at the app-db as an expandable tree


haven’t tried 10x to do that instead