Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: View::render_to_string panic #2200

Merged
merged 1 commit into from
Jan 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions leptos_dom/src/ssr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,13 @@ fn fragments_to_chunks(

impl View {
/// Consumes the node and renders it into an HTML string.
///
/// This is __NOT__ the same as [`render_to_string`]. This
/// functions differs in that it assumes a runtime is in scope.
/// [`render_to_string`] creates, and disposes of a runtime for you.
///
/// # Panics
/// When called in a scope without a runtime. Use [`render_to_string`] instead.
#[cfg_attr(
any(debug_assertions, feature = "ssr"),
instrument(level = "trace", skip_all,)
Expand Down
Loading