Leptos Meta
Leptos Meta allows you to modify content in a document’s <head>
from within components
using the Leptos
web framework.
Document metadata is updated automatically when running in the browser. For server-side
rendering, after the component tree is rendered to HTML, [MetaContext::dehydrate
] can generate
HTML that should be injected into the <head>
of the HTML document being rendered.
use *;
use *;
Feature Flags
csr
Client-side rendering: Generate DOM nodes in the browserssr
Server-side rendering: Generate an HTML string (typically on the server)hydrate
Hydration: use this to add interactivity to an SSRed Leptos appstable
By default, Leptos requiresnightly
Rust, which is what allows the ergonomics of calling signals as functions. Enable this feature to supportstable
Rust.
Important Note: You must enable one of csr
, hydrate
, or ssr
to tell Leptos
which mode your app is operating in.