helix

lilactown 2022-05-28T18:56:17.981819Z

I don't want to tease too much, but as of this morning I have a "working" POC of SSR on the JVM that supports streaming, suspense and partial hydration

lilactown 2022-05-28T18:56:49.908369Z

"working" is in quotes there because I can only generate HTML tags that have :style and :id attributes on the server lol

👍 4
❤️ 2
🚀 2
🎉 2
lilactown 2022-05-28T18:58:12.796639Z

a lot of the work has been reverse engineering the demo from this post https://github.com/reactwg/react-18/discussions/37

lilactown 2022-05-28T19:15:41.035859Z

short video of the POC. it renders the initial page with "Loading..." messages on the server, and then waits on some I/O (in this case a Thread/sleep) before streaming the content to replace the loading message with. meanwhile, on the client the whole page is hydrated as soon as the JS loads and makes the counter button interactive while it waits for the rest of the content to be sent by the server

🤯 2
emccue 2022-05-28T00:27:32.030689Z

How are we supposed to pass along children?

(defnc content-spacing
  "Used to space between sub-sections and small groups of content"
  [{:keys [children]}]
  ($ Stack
     {:direction :column
      :spacing   3}
     children))

...

($ content-spacing (d/h1 "A") (d/h1 "B") (d/h1 "C"))
Doing this doesn't seem to "work" and the items don't get the spacing dictated by the container

2022-05-28T01:24:45.346119Z

@emccue is Stack a javascript library ? If so :column is not being changed to "string" I suppose, so I would pass "column"

emccue 2022-05-28T01:45:57.482919Z

@geraldodev That did it. Thank you

emccue 2022-05-28T01:46:26.042239Z

(translating a reagent mui prototype to using normal mui)

👍 1
lilactown 2022-05-28T01:16:18.632189Z

hm, that ought to work. what happens when you do that?