Beta2: How do I render html attribute server-side

Previously (beta 1) was using root.data to pipe in value so available could set theme and other props on the root html tag, but that no longer exists. Any ideas?
3 Replies
gh680
gh6802y ago
The document structure/tags (html/body/head etc) have moved from root.tsx to entry-server.tsx. A bit of a change, but I got things working 👍
hotshoe
hotshoeOP2y ago
@gh680 , yes, saw that too. question is how to [dynamically] render attributes into root (html) element. SvelteKit provides transformPageChunk to handle this, and Remix give access full tree in root so it's a no-brainer.
s.dreva
s.dreva2y ago
Are there any updates regarding dynamically setting attributes into root?

Did you find this page helpful?