reagent

2023-04-23T13:44:29.455919Z

Am i correct to conclude that reagent doesn't really support clojure, and i should go the nodejs route if thinking about isomorphic ssr?

p-himik 2023-04-23T13:48:50.213379Z

Reagent can't be run on Clojure because it uses React. In theory, you can run SSR using a JS engine within JVM. No clue how feasible it is.

2023-04-23T13:53:27.219009Z

Yeah, i wondered if the necessary parts of react had been reimplemented so that it could work, but i guess not. Nodejs seems the easier route to take.

2023-04-23T13:54:23.138119Z

My problem there is i'm using re-graph which has no nodejs support as it uses cljs-http, but that seems like the easier thing to solve.

p-himik 2023-04-23T13:56:35.449729Z

In general, the necessary parts can't be reimplemented that way because some views could be using React components or hooks. No way to magically port those to CLJ.

👍 1
p-himik 2023-04-23T13:57:27.163209Z

And if your code uses neither, then you can implement those necessary parts of Reagent quite easily because it's all Hiccup, albeit with some allowances for functions-as-tags. :)

2023-04-23T13:58:47.716469Z

Yeah, i don't use hooks but i do have some react components. Should have really figured that out from the start.