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:
1 parent
9d7ee79826
commit
f5683a2346
9 files changed
+197
-174
No files matched your search
@@ -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 {}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user