helix

lilactown 2022-03-30T18:43:51.969069Z

if i were to work on SSR for helix, there are several things that I think that encompasses

šŸ‘ 1
Derek 2022-03-30T18:45:00.291319Z

Anyone tried helix with React v18?

lilactown 2022-03-30T18:49:21.238769Z

I built the pyramid site i linked above with an alpha version of it

Derek 2022-03-30T18:55:39.053519Z

Awesome, including createRoot?

Derek 2022-03-30T18:55:43.036539Z

I should just look

lilactown 2022-03-30T18:56:24.164039Z

yeah

Derek 2022-03-30T18:56:32.799909Z

Awesome, I see it now

lilactown 2022-03-30T18:56:39.602269Z

there aren't any changes required for helix

1
lilactown 2022-03-30T18:56:43.759929Z

just new APIs

lilactown 2022-03-30T18:48:45.498589Z

with the latest react 18 these are all the things that fall under "SSR" IMO 1. rendering to a string, i.e. basic generation of static content on the JVM a. static hydration support, i.e. ensuring that HTML generated on the server matches and can be hydrated once the client mounts 2. streaming SSR a. data fetching with suspense on the server b. partial hydration in suspense boundaries 3. server-side components

lilactown 2022-03-30T18:50:01.922499Z

(1) feels pretty tractable, lots of examples of doing that already with e.g. rum and uix

lilactown 2022-03-30T18:51:29.075429Z

streaming SSR (2) seems pretty complex. it requires a runtime that interoperates with a streaming protocol that I am not sure how to define or build yet

lilactown 2022-03-30T18:53:02.176639Z

(3) is something I'm waiting until it stabilizes before I try and build something around, but I am thinking about how I could potentially build towards it

Aleed 2022-04-30T06:20:54.372689Z

taking a cursory look at this today does not look like the the webpack compile functionality would be too difficult to implement with macros https://github.com/facebook/react/tree/main/packages/react-server-dom-webpack but converting components into their server rendered format looks more convoluted.. as it also handles hook, context, streaming etc https://github.com/facebook/react/tree/main/packages/react-server

Aleed 2022-04-30T06:21:26.660269Z

i’m thinking this may give more impetus to using clojurescript via nodejs šŸ˜‚

lilactown 2022-03-30T18:56:14.735419Z

hmm uix looks like it has streaming support for data fetching, i think https://github.com/roman01la/uix/blob/master/core/dev/uix/recipes/server_rendering.clj

šŸ¤” 1