-
Heya, I'm having trouble understanding how to write code with the Is the following understanding correct?
I figured this would be worth a discussion instead of discord, since it's so difficult to figure out, and is worth keeping it searchable. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I think what you wrote in 1, 2, and 3 sounds accurate. So I'll try to answer the open questions:
App.
Both.
SSR.
App.
App. |
Beta Was this translation helpful? Give feedback.
This is true, but I think the conclusions you're drawing/the trains of thought you're going down are based on a misunderstanding. The
leptos_meta
components<Stylesheet/>
and<Link/>
can be used anywhere, and insert the appropriate tags into the<head>
; that is their primary purpose. Whether you're using them in CSR or in SSR, they will end up in the<head>
, wherever in the app you use them.If you are using Trunk for CSR, your
index.html
fulfills the same function that theshell
function fulfills in SSR mode.So, if you have a few static stylesheets or
<link>
tags, you can either<Stylesheet/>
and<Link/>
froml…