wip: docs

Worked a bit on adding more examples. Trying out a new "antipattern" example to show how *not* to use Dioxus.
This commit is contained in:
Jonathan Kelley committed 2021-06-23 22:32:54 -04:00
1 parent 9d7ee79826
commit f5683a2346
9 files changed
+197 -174

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
//! 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 {}
}
}