Fork me on GitHub
#helix
<
2022-05-28
>
emccue00:05:32

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

geraldodev01:05:45

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

emccue01:05:57

@U0516053R That did it. Thank you

emccue01:05:26

(translating a reagent mui prototype to using normal mui)

👍 1
lilactown01:05:18

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

lilactown18:05:17

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

lilactown18:05:49

"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
lilactown18:05:12

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

lilactown19:05:41

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