From d746f8338761c348a0bc00a08ab0fb9fc5f4dfb7 Mon Sep 17 00:00:00 2001 From: Chris <89366859+chrisp60@users.noreply.github.com> Date: Fri, 19 Jan 2024 20:07:39 -0500 Subject: [PATCH] docs: `View::render_to_string` panic (#2200) Co-authored-by: chrisp60 --- leptos_dom/src/ssr.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/leptos_dom/src/ssr.rs b/leptos_dom/src/ssr.rs index 562cf79f6c..2de8067abc 100644 --- a/leptos_dom/src/ssr.rs +++ b/leptos_dom/src/ssr.rs @@ -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,)