yew-autoprops

Crate Info API Docs

proc-macro to automatically derive Properties structs from args for Yew components

No more extra one-off Props structs!

Examples

```rust use yewautoprops::autopropscomponent; use yew::prelude::*;

[autoprops_component]

fn CoolComponent(#[propordefault] test: &i8, smth: &usize) -> Html { println!("test: {}", test);

html! {
    <div>
        <p>{ smth }</p>
    </div>
}

} ```

```rust use yewautoprops::autopropscomponent; use yew::prelude::*;

[autoprops_component(CoolComponent)]

fn coolcomponent(#[propor_default] test: &i8, smth: &usize) -> Html { println!("test: {}", test);

html! {
    <div>
        <p>{ smth }</p>
    </div>
}

} ```