This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-11
Channels
- # announcements (1)
- # aws (5)
- # beginners (8)
- # biff (7)
- # calva (32)
- # cider (26)
- # clj-kondo (6)
- # clojure (100)
- # clojure-europe (6)
- # clojure-greece (1)
- # clojurescript (15)
- # core-logic (3)
- # fulcro (2)
- # honeysql (4)
- # hoplon (39)
- # hyperfiddle (11)
- # lsp (12)
- # other-languages (2)
- # podcasts-discuss (1)
- # squint (30)
Hi, coming from backend, I only have several months of frontend experience and that was in Clojure and Re-frame. But I have felt like I am not really understanding what's going on on the platform level (browser, raw JS functions). For instance, I know how Re-frame works but don't know what Reagent is exactly doing on top of React. I am realizing I am missing fundamentals. So I was playing around with JS functions on the cljs Repl and was asking myself what if I try to build something only using JS libraries like React or Solid on CLJS only using Hiccup (so no reagent or re-frame). Do you think it'd be possible? If so, do you agree that it'd give me more fundamental understanding of JS and CLJS.
I'd strongly suggest leaving CLJS out of the question and focusing on JS for a bit. Let alone adding Hiccup into the mix without, I assume, any third-party libraries.
well you could write a really basic hiccup -> react translator in very few lines of code
Yes, and that sounds reasonably necessary, because reagent and Re-frame are based on react.
The question is not very well-defined. If you want fundamentals, try JavaScript with no wrappers. If you want some exposure to the "laws of physics" without going completely feral, then just implement a feature like streaming input from a text file or streaming output to a text file, without using any libraries.
last time I checked part of solid was compiler based, as in the compiler doing code transformations. that will not really work as it won't recognize the CLJS output properly to do its thing. so I don't think its possible at all, but I haven't spent much time researching so thats basically just a guess.
react does require any compiler support, so thats why its so common in CLJS. things like svelte or solid just don't convert as easily
@U0HG4EHMH agreed. I have learned the basics of React and Solid on JS, so I have some understanding of how it works. But what I do on reframe and cljs just feels too different from them. I know it's another layer but still the targeting platform is the same, so I should be able to project what my cljs codes will be translated and manipulate the browser. Yea, this is a vague goal or I just don't know what reagent does.
@U05224H0W that makes sense.
reagent basically transforms hiccup into react.createElement
calls, basically same thing JSX does, plus some extra plumbing to make atoms work. not much else