resuma 0.4.7

Resuma — resumable SSR Rust web framework: zero hydration, islands, server actions, Flow (Axum).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Portals — render children into a remote DOM target on the client.

use super::view::{Attr, AttrValue, Child, Element, View};

/// Portal content projected to `#target` (or `[data-r-portal-target="target"]`).
pub fn portal(target: impl Into<String>, children: Vec<Child>) -> View {
    View::Element(Element {
        tag: "template".into(),
        attrs: vec![Attr {
            name: "data-r-portal".into(),
            value: AttrValue::Static(target.into()),
        }],
        children,
        dom_id: None,
    })
}