ranile / material-yew

Yew wrapper for Material Web Components
https://material-yew.rm.rs
Apache License 2.0
230 stars 35 forks source link

Is it working at all? #39

Closed Goodjee closed 1 year ago

Goodjee commented 1 year ago

Hello. Am I do something wrong or it doesn't work? Even example isn't working!

use yew::prelude::*;
use material_yew::MatButton;
use yew::html;

#[function_component(App)]
fn app() -> Html {
    html! {
        <>
         { "Hello World" }
         <MatButton label="Click me!" />
        </>
    }
}

fn main() {
   yew::Renderer::<App>::new().render();
}

Giving me error:

<MatButton label="Click me!" />
   |              ^^^^^^^^^ the trait `yew::Component` is not implemented for `MatButton`
ranile commented 1 year ago

This library currently only works with Yew 0.19. It has not been updated to work with Yew 0.20 (primarily because the underlying material components are no longer maintained and their replacement is still in the works by the Material team)

Goodjee commented 1 year ago

This library currently only works with Yew 0.19. It has not been updated to work with Yew 0.20 (primarily because the underlying material components are no longer maintained and their replacement is still in the works by the Material team)

Hallelujah! It's working on 0.19.3. Thanks for reply!

ootoo1 commented 1 year ago

Here is a fork of material-yew which also works with yew 0.20.0 https://github.com/ootoo1/material-yew

ranile commented 1 year ago

@ootoo1 would you like to PR the patch? I can publish the update to crates.io so users of the library can also use it on Yew 0.20. Hopefully it'll be the last update before Material 3

ootoo1 commented 1 year ago

@hamza1311 sure, pull request is https://github.com/hamza1311/material-yew/pull/34