Fork me on GitHub
#luminus
<
2017-05-09
>
claudiu17:05:33

@yogthos would you go with om-next or re-frame if server side rendering was a requirement ?

yogthos17:05:02

I have a strong preference for re-frame 😉

yogthos17:05:32

I find it’s a lot simpler to use, and it’s less opinionated, so you can fit it to your requirements much easier

yogthos17:05:57

om next also seems to pretty much assume datomic as the backend, and you have to write your own parser if you’re using anything else

yogthos17:05:26

my team has been working on a re-frame based app for over a year now, and we haven’t run into any limitations with it

claudiu18:05:48

@yogthos cool. Thank you. Playing with om-next now, will see how it goes (no datomic backend unfortunately). Sure wish re-frame & reagent would work on backend clj though.

yogthos18:05:44

what do you mean?

claudiu18:05:06

Ohh. Know I tried a few months back to render on the server and it seemed like re-frame was cljs only.

claudiu18:05:00

I meant rendering the app on server, and then the javascript will just mount on the existing divs.

yogthos22:05:21

@claudiu ah I see, you can actually do that relatively easily for some cases http://yogthos.net/posts/2015-11-24-Serverside-Reagent.html

yogthos22:05:47

if you write your common code in cljc, then you can render it with hiccup on the server and have reagent hook into it on the client

yogthos22:05:42

one thing not mentioned in the post is that you also need to generate a hash as seen here https://github.com/tonsky/rum/blob/gh-pages/src/rum/server_render.clj#L473