This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-03
Channels
- # babashka (5)
- # beginners (34)
- # biff (3)
- # calva (29)
- # cherry (11)
- # cider (7)
- # clojure (148)
- # clojure-brasil (1)
- # clojure-europe (16)
- # clojure-nl (1)
- # clojure-norway (6)
- # clojure-uk (6)
- # clojuredesign-podcast (8)
- # clojurescript (49)
- # cursive (1)
- # datalevin (7)
- # fulcro (1)
- # honeysql (1)
- # jobs (1)
- # matrix (7)
- # off-topic (13)
- # re-frame (12)
- # react (21)
- # reagent (42)
- # releases (6)
- # remote-jobs (2)
- # shadow-cljs (9)
- # solo-full-stack (5)
- # sql (7)
- # squint (9)
- # vim (2)
- # xtdb (11)
- # yamlscript (5)
what is a clojurescript react wrapper that can work well with react 18 including https://react.dev/reference/react-dom/server/renderToPipeableStream
UIx and Helix are the most popular ones
I know, but sadly it's been a long time when I could find any correlation between popularity and corner cases being supported 🙂 I was hoping maybe someone can speak from experience. I managed to set up reagent but these inconsistencies make all the work dubious now.
both are thin wrappers around React, including support for v18, that's the only requirement needed to be able to use renderToPipeableStream
even if none of them wrap and expose renderToPipeableStream
, it's still possible to use the function by requiring React directly and calling react/renderToPipeableStream
of course, but then I am creating code I need to maintain myself, and it will be between two external dependencies so that's a bit too much risk for some applications that I just want to write and forget
well, it's literally a single function call that doesn't require any gluing code, I don't see how it can be risky
if renderToPipeableStream
gets a breaking change in the future in React, the same will happen in the wrapping libraries
helix doesn't have any code that wraps react-dom/client or react-dom/server, and may not ever. it's expected that helix helps creating components and elements, and how you render them (dom server, dom client, react native, etc.) is your code
Roman's totally right that calling renderToPipeableStream
is as low amount of coupling as you can get.
I think we were talking at cross purposes, it's totally on me, not making myself clear. The idea would be so that I don't have to manually work out all the kinks related to renderToPipeableStream myself. for example, after 3 months now, I returned to this, and while the initial page load works just fine, I can hydrate, etc. Hot reload (with shadow-cljs) doesn't. I don't yet know what the problem is, but probably 3 more months until I have time again...
like, i have this after page load
(when nil? @container (reset! root (createRoot @container)))
and still I get errors from react
> Warning: You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.Well, the code is wrong. Also the container should be defonce
I still don’t see how this could help with your issues.
Sorry, root creation should be defonced