Skip to content

Commit

Permalink
docs: View::render_to_string panic (#2200)
Browse files Browse the repository at this point in the history
Co-authored-by: chrisp60 <[email protected]>
  • Loading branch information
chrisp60 and chrisp60 authored Jan 20, 2024
1 parent 0c4cf54 commit d746f83
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit d746f83

Please sign in to comment.