Files
dioxus/packages/html-namespace/examples/poc.rs
T
Jonathan Kelley f5683a2346 wip: docs
Worked a bit on adding more examples. Trying out a new "antipattern" example to show how *not* to use Dioxus.
2021-06-23 22:32:54 -04:00

31 lines
494 B
Rust

//! POC: Planning the layout of a single element type
//!
//!
//! The ultimate goal with a dedicated namespace is three-fold:
//! - compile-time correct templates preventing misuse of elemnents
//! - deep integration of DSL with IDE
//!
//!
//!
struct NodeCtx {}
struct div<'a>(&NodeCtx);
impl<'a> div<'a> {
fn new(cx: &NodeCtx) -> Self {
div(cx)
}
}
fn main() {}
fn factory(
// this is your mom
cx: &NodeCtx,
) {
div::new(cx);
rsx! {
div {}
}
}