Fork me on GitHub

what's the current state of the art for server-side clojurescript? I want to start rendering my single-page reagent/re-frame app server-side for SEO purposes. I found Macchiato, which looks good but wanted to check here first.


I use rum, which lets me do server-side rendering without introducing the complexity of running a JavaScript engine. I'm really happy with the results.


I had good success replicating the setup used in It uses Node.js as a server thereby allowing you to do ClojureScript both server- and client-side. Edit: Considering that server-side routes (different from the app routes) makes up such a miniscule part of a server-side rendered app, I think Express and ClojureScript-JavaScript-interop works well enough. If you need multiple threads you can use Node.js' cluster module.


hi everyone. I've been playing around with Svelte.js recently and I truly believe it is the way to go forward for frontend - eliminating framework code and having these compilers, that just dump out plain old html / javascript / css. so I was wondering if there's something like this in clojurescript yet? most (if not all) frontend frameworks in clojurescript seem to be just React wrappers


I'm in the process of writing something but it is nowhere near ready


Presented without comment, but with a heartfelt thanks to the ClojureScript team 😊

[org.clojure/clojurescript "1.10.520" :scope "provided"]
-rw-r--r--  1 jwr  staff  2471526 Nov 19 12:03 app.js
-rw-r--r--  1 jwr  staff   497125 Nov 19 12:03 

[org.clojure/clojurescript "1.10.597" :scope "provided"]
-rw-r--r--  1 jwr  staff  2384275 Nov 19 12:06 app.js
-rw-r--r--  1 jwr  staff   486855 Nov 19 12:06 

👍 4
parrot 4
🚀 4
👏 4

also seeing bundle getting -100KB in size, guess thanks to @thheller patch that removes unnecessary function wrappers

simple_smile 4
Ramon Rios18:11:26

Hey guys, do we have some example of how to setup a form on re-frame app, store the values and etc. I still thinking on OO programming this time so it's really hard for me create a form that stores it's values in db

Ramon Rios18:11:48

I don't know if the best approach is get the values individually or create a list with a key value


You can have a nested map structure with the outmost key being for example :login-form and its value would be a map of inputs like :name :email and so on ... This would be very basic though because if you need to display errors and do other form stuff then the logic starts getting more complex pretty quickly ... but as a general idea, use maps because by knowing the key you can access your value in O(1) without the need of traversing the collection with filter or similar

Ramon Rios11:11:12

Got it, let me try this. Really thanks


I wrote a very small library to handle forms for re-frame you might look at to see how I am doing it :)


There are use cases where sequences work great but I don’t think this is one of those


is lein new re-frame <appname> is way to go for a new reframe project? Does it have all the benefits of shadow-cljs easy npm integration, no need for cljsjs?


@cakir-enes yes, that is the way to go


And, yes, that template uses shadow-cljs