You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2020. It is now read-only.
I know the Cargo.toml there says to install yew with the std-web feature, but I thought I could copy the code and it would work in web-sys too. When I tried that I got:
error[E0432]: unresolved import `yew::ClickEvent`
--> src/lib.rs:4:27
|
4 | use yew::{html, Callback, ClickEvent, Component, ComponentLink, Html, ShouldRender};
| ^^^^^^^^^^ no `ClickEvent` in the root
error[E0282]: type annotations needed
--> src/lib.rs:30:37
|
30 | onclick: link.callback(|_| Msg::Click),
| ^ consider giving this closure parameter a type
error: aborting due to 2 previous errors
I was able to fix it by replacing every reference to ClickEvent with MouseEvent.
I think it would be great to either add a version of the code that works in web-sys on that page or make a separate "Sample app" page for web-sys.
The text was updated successfully, but these errors were encountered:
I'm talking about the code on this page: https://yew.rs/docs/getting-started/build-a-sample-app
I know the
Cargo.toml
there says to install yew with the std-web feature, but I thought I could copy the code and it would work in web-sys too. When I tried that I got:I was able to fix it by replacing every reference to
ClickEvent
withMouseEvent
.I think it would be great to either add a version of the code that works in web-sys on that page or make a separate "Sample app" page for web-sys.
The text was updated successfully, but these errors were encountered: