Feat: props now autoderives its own trait

This commit is contained in:
Jonathan Kelley committed 2021-03-12 15:41:36 -05:00
1 parent d4f1ceaffb
commit b3c96a5996
10 files changed
+123 -83

No files matched your search

+2 -6
View File
@@ -1,6 +1,6 @@
use dioxus_core_macro::Props;
use dioxus_core::prelude::*;
#[derive(Debug, Props)]
#[derive(Debug, PartialEq, Props)]
struct SomeProps {
a: i32,
@@ -9,12 +9,8 @@ struct SomeProps {
b: Option<i32>,
}
// have we committed to the trait style yet?
fn main() {
let g: SomeProps = SomeProps::builder().a(10).b(10).build();
let _r = g.b.unwrap_or_else(|| 10);
}
fn auto_into_some() {}