Feat: include the helper

This commit is contained in:
Jonathan Kelley committed 2021-02-03 02:26:04 -05:00
1 parent f2eec79fd4
commit 07341d2c65
22 files changed
+2990 -1311

No files matched your search

+6 -1
View File
@@ -19,7 +19,7 @@
//! The `TextRenderer` is particularly useful when needing to cache a Virtual DOM in between requests
//!
use dioxus_core::prelude::FC;
use dioxus_core::prelude::{VNode, FC};
/// The `TextRenderer` provides a way of rendering a Dioxus Virtual DOM to a String.
///
@@ -56,6 +56,11 @@ impl<T> TextRenderer<T> {
todo!()
}
/// Immediately render a DomTree to string
pub fn to_text(root: VNode) -> String {
todo!()
}
/// Render the virtual DOM to a string
pub fn render(&self) -> String {
let mut buffer = String::new();