-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New event macros cause extremely confusing error message #251
Comments
I also encountered this today, but I don't think it is a bug, it is just a breaking change. It affects projects using yew 0.3. |
You are right! This affects 0.3 and it's a breaking-change. Error message looks terrible, but to support old and new styles I have to make macro very large that's why I decided to support a new one. To update your templates from 0.3 to 0.4 you should change: html! {
<input value=&self.name, oninput=move |e: InputData| Msg::UpdateEvent(idx, e.value), />
} with: html! {
<input value=&self.name, oninput=|e| Msg::UpdateEvent(idx, e.value), />
} I prefer to derive types automatically where possible (especially in templates). And I like the idea to publish this changes soon, because I am in progress to upgrade the framework to actors model and I have a significant progress in this direction. We shouldn't overload 0.4 release with a lot of changes 👌 |
@deniskolodin I really prefer the new style 👍 I think it would be good to include a changelog for such breaking changes in the future though (this breakage is in 0.4) 😄 |
This may be resolved by #756 |
Removed the magical event macro here: #782 |
Description
I'm submitting a bug
When bumping to the latest commit (00e7a97) of yew, I get extremely confusing error messages of the form
It appears this is because #240 now auto-adds the move keyword.
This was clearly done deliberately, so just raising for visibility.
The text was updated successfully, but these errors were encountered: