diff --git a/README.md b/README.md index f594d1c..c6217e6 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,9 @@ use yew_autoprops::autoprops_component; use yew::prelude::*; #[autoprops_component] -fn CoolComponent(#[prop_or_default] test: &i8, smth: &usize) -> Html { - println!("test: {}", test); - +fn CoolComponent(#[prop_or_default] hidden: bool, smth: &AttrValue) -> Html { html! { -
+

{ smth }

} @@ -30,11 +28,9 @@ use yew_autoprops::autoprops_component; use yew::prelude::*; #[autoprops_component(CoolComponent)] -fn cool_component(#[prop_or_default] test: &i8, smth: &usize) -> Html { - println!("test: {}", test); - +fn cool_component(#[prop_or_default] hidden: bool, smth: &AttrValue) -> Html { html! { -
+

{ smth }

} diff --git a/src/lib.rs b/src/lib.rs index 31b53e9..0467478 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,11 +10,9 @@ //! use yew::prelude::*; //! //! #[autoprops_component] -//! fn CoolComponent(#[prop_or_default] test: &i8, smth: &usize) -> Html { -//! println!("test: {}", test); -//! +//! fn CoolComponent(#[prop_or_default] hidden: bool, smth: &AttrValue) -> Html { //! html! { -//!
+//!
//!

{ smth }

//!
//! } @@ -26,11 +24,9 @@ //! use yew::prelude::*; //! //! #[autoprops_component(CoolComponent)] -//! fn cool_component(#[prop_or_default] test: &i8, smth: &usize) -> Html { -//! println!("test: {}", test); -//! +//! fn cool_component(#[prop_or_default] hidden: bool, smth: &AttrValue) -> Html { //! html! { -//!
+//!
//!

{ smth }

//!
//! }