Fork me on GitHub
#helix
<
2022-03-30
>
lilactown18:03:51

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

šŸ‘ 1
Derek18:03:00

Anyone tried helix with React v18?

lilactown18:03:21

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

Derek18:03:39

Awesome, including createRoot?

Derek18:03:43

I should just look

Derek18:03:32

Awesome, I see it now

lilactown18:03:39

there aren't any changes required for helix

chef_kiss 1
lilactown18:03:43

just new APIs

lilactown18:03:45

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

lilactown18:03:01

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

lilactown18:03:29

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

lilactown18:03:02

(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

Aleed06:04:54

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

Aleed06:04:26

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

lilactown18:03:14

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