Open Collective
Open Collective
Announcing the v0.13 release of Yew!
Published on March 7, 2020 by Justin Starry

Hello, I'm excited to share with all of you the latest Yew release :)

In this release, we have added support for building web apps with the foundational web-sys crate from the Rust and Web Assembly Working Group. We have also started integrating the gloo crate (also from the rust/wasm working group) for event listeners.

Another big change in this release is an update to how Component properties are specified. For context, Yew allows compile time property checking when declaring components with "JSX" style syntax. Before this release, properties were treated as optional by default, and struct fields could be annotated with a macro attribute if they were to be treated as required (forgetting to pass a required property results in a compile error). For this release, we flipped the default behavior. Properties are treated as required by default and optional if annotated as such. The new syntax takes advantage of arbitrary token custom attributes released in Rust 1.34 and looks like this:

In other news, we have officially kicked off our Chinese Gitter and the Chinese community has translated a lot of the new documentation site into Chinese! If you are interested in translating Yew docs into a new language, please reach out!