pub fn use_append_head_content<'hook, F, Fut>(
f: F,
) -> impl 'hook + Hook<Output = ()>
Expand description
A server-side hook that appends content to head element.
This async function is resolved after the page is completed rendered and the returned string is
appended at the location of the <!--%STELLATION_HEAD%-->
comment in index.html
, after other
contents.
§Warning
The content is not managed at the client side. This hook is used to facility specific crates such as a CSS-in-Rust solution.
If you wish to render content into the <head>
element, you should use
bounce::helmet::Helmet
.
§Panics
This hook should be used by a server-side only component. Panics if used in client-side rendering.
§Note
When used in function components and hooks, this hook is equivalent to:
pub fn use_append_head_content<F, Fut>(f: F)
where
F: 'static + FnOnce() -> Fut,
Fut: 'static + Future<Output = String>,
{
/* implementation omitted */
}