use super::{RootView, RootViewContext};
pub struct ClosureRootView<F>(pub F);
impl<F> RootView for ClosureRootView<F>
where
F: Fn(RootViewContext<'_>) -> Result<String, String> + Send + Sync,
{
fn render(&self, ctx: RootViewContext<'_>) -> Result<String, String> {
(self.0)(ctx)
}
}