Skip to content

Commit 610f931

Browse files
docs: 0.22.0 prep (#3952)
1 parent 54c20db commit 610f931

File tree

7 files changed

+391
-25
lines changed

7 files changed

+391
-25
lines changed

CHANGELOG.md

Lines changed: 71 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,101 @@
11
# Changelog
22

3-
## ✨ yew **0.22.0** *(2024-10-14)*
3+
## ✨ yew **0.22.0** *(2025-12-08)*
44

55
#### Changelog
66

7-
## 🛠 Fixes
7+
## 🚨 Breaking changes
88

9-
- Fix: Hydratation of empty lists next to components.. [[@WorldSEnder](https://github.com/WorldSEnder), [#3630](https://github.com/yewstack/yew/pull/3630)]
10-
silenced non-normalised element name warnings for SVG elements [@Tim Kurdov](https://github.com/its-the-shrimp), [#3769](https://github.com/yewstack/yew/pull/3769)]
9+
- **MSRV raised to 1.84.0.** [[@Siyuan Yan](https://github.com/Madoshakalaka), [#3900](https://github.com/yewstack/yew/pull/3900)]
10+
- Allow setting JsValue as properties. [[@Elina](https://github.com/ranile), [#3458](https://github.com/yewstack/yew/pull/3458)]
11+
- Remove deprecated `class=(...)` syntax. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3497](https://github.com/yewstack/yew/pull/3497)]
12+
- Remove ToHtml trait. [[@Elina](https://github.com/ranile), [#3453](https://github.com/yewstack/yew/pull/3453)]
13+
- Make `<textarea>` a void element (no children allowed anymore). [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3465](https://github.com/yewstack/yew/pull/3465)]
1114

1215
## ⚡️ Features
1316

14-
- Raise MSRV to 1.76. [[@Elina](https://github.com/ranile), [#3693](https://github.com/yewstack/yew/pull/3693)]
17+
- **Add for-loops to `html!` macro.** [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3498](https://github.com/yewstack/yew/pull/3498)]
18+
- **Rename `#[function_component]` to `#[component]`.** [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3885](https://github.com/yewstack/yew/pull/3885)]
19+
- Add `serde` feature to yew. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3880](https://github.com/yewstack/yew/pull/3880)]
20+
- Add `use_ref` hook. [[@Alex Parrill](https://github.com/ColonelThirtyTwo), [#3548](https://github.com/yewstack/yew/pull/3548)]
21+
- Better ImplicitClone ergonomics. Fewer ampersands and stars needed in the `html!` macro. [[@Cecile Tonglet](https://github.com/cecton), [#3508](https://github.com/yewstack/yew/pull/3508), [#3431](https://github.com/yewstack/yew/pull/3431)] [[@Siyuan Yan](https://github.com/Madoshakalaka), [#3892](https://github.com/yewstack/yew/pull/3878)]
22+
- Preserve camelCase for known SVG elements. [[@Siyuan Yan](https://github.com/Madoshakalaka), [#3875](https://github.com/yewstack/yew/pull/3875)]
1523
- Add `inert` to the boolean attributes list. [[@Tomoaki Kawada](https://github.com/kawadakk), [#3678](https://github.com/yewstack/yew/pull/3678)]
16-
- Namespace support for `VRaw`.. [[@Finn Bear](https://github.com/finnbear), [#3640](https://github.com/yewstack/yew/pull/3640)]
17-
- Add generic type hints to boxed hooks. [[@Michael Meyer](https://github.com/Ichmed), [#3633](https://github.com/yewstack/yew/pull/3633)]
18-
- add the methods and From impls. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3519](https://github.com/yewstack/yew/pull/3519)]
19-
- Add IntoPropValue impl for converting to VList. [[@Muhammad Hamza](https://github.com/ranile), [#3444](https://github.com/yewstack/yew/pull/3444)]
20-
- Add CallbackRef that takes ref in argument instead of value. [[@Cecile Tonglet](https://github.com/cecton), [#3419](https://github.com/yewstack/yew/pull/3419)]
21-
- Remove the dependency on `boolinator`. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3420](https://github.com/yewstack/yew/pull/3420)]
24+
- Namespace support for `VRaw`. [[@Finn Bear](https://github.com/finnbear), [#3640](https://github.com/yewstack/yew/pull/3640)]
25+
- `to_callback` methods and From impls to convert reducer dispatchers and state setters to callbacks. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3519](https://github.com/yewstack/yew/pull/3519)]
26+
- Allows converting `ChildrenRenderer<VNode>` and `VChild` to VList. [[@Muhammad Hamza](https://github.com/ranile), [#3444](https://github.com/yewstack/yew/pull/3444)]
27+
- Add `CallbackRef` that takes ref in argument instead of value. [[@Cecile Tonglet](https://github.com/cecton), [#3419](https://github.com/yewstack/yew/pull/3419)]
2228
- Allow import of layout_test into 3rd party crates. [[@rollo-b2c2](https://github.com/rollo-b2c2), [#3463](https://github.com/yewstack/yew/pull/3463)]
2329
- Add WASI support for server-side rendering. [[@langyo](https://github.com/langyo), [#3534](https://github.com/yewstack/yew/pull/3534)]
30+
- Make `UseFutureHandle` Clone. [[@Adam Steinberg](https://github.com/AdamSteinberg1), [#3529](https://github.com/yewstack/yew/pull/3529)]
31+
- Allow `Self` in prop fields. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3569](https://github.com/yewstack/yew/pull/3569)]
32+
- Allow boolean in `html!`. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3441](https://github.com/yewstack/yew/pull/3441)]
2433

25-
## 🚨 Breaking changes
34+
## 🛠 Fixes
2635

27-
- Add use_ref. [[@Alex Parrill](https://github.com/ColonelThirtyTwo), [#3548](https://github.com/yewstack/yew/pull/3548)]
28-
- Allow setting JsValue as properties. [[@Elina](https://github.com/ranile), [#3458](https://github.com/yewstack/yew/pull/3458)]
29-
- Remove deprecated `class=(...)` syntax. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3497](https://github.com/yewstack/yew/pull/3497)]
30-
- Remove ToHtml trait. [[@Elina](https://github.com/ranile), [#3453](https://github.com/yewstack/yew/pull/3453)]
31-
- Make Html (VNode) cheap to clone. [[@Cecile Tonglet](https://github.com/cecton), [#3431](https://github.com/yewstack/yew/pull/3431)]
36+
- Fix panic when hydrating components with unstable render order. [[@WorldSEnder](https://github.com/WorldSEnder), [#3914](https://github.com/yewstack/yew/pull/3914)]
37+
- Fix hydration panic on camelCased elements. [[@Siyuan Yan](https://github.com/Madoshakalaka), [#3876](https://github.com/yewstack/yew/pull/3876)]
38+
- Fix autocompletion in html macro for rust-analyzer. [[@Moritz Hedtke](https://github.com/mohe2015), [#3829](https://github.com/yewstack/yew/pull/3829)]
39+
- Fix empty lists hydration failure when they were placed next to suspensions and other components. [[@WorldSEnder](https://github.com/WorldSEnder), [#3630](https://github.com/yewstack/yew/pull/3630)]
40+
- Silenced non-normalised element name warnings for SVG elements. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3769](https://github.com/yewstack/yew/pull/3769)]
41+
- Fixed inconsistent clone() requirement when passing Classes to HTML elements vs. components. [[@Siddhant Shekhar](https://github.com/sshekhar563), [#3931](https://github.com/yewstack/yew/pull/3931)]
42+
- Fix svg animation always starting immediately. [[@Siyuan Yan](https://github.com/Madoshakalaka), [#3892](https://github.com/yewstack/yew/pull/3892)]
43+
- Better diagnostics for byte literals in `html!`. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3441](https://github.com/yewstack/yew/pull/3441)]
44+
- Concise diagnostics for missing props. [[@Siyuan Yan](https://github.com/Madoshakalaka), [#3873](https://github.com/yewstack/yew/pull/3873)]
45+
- Use the namespace when xmlns attributes are specified. [[@JasonCG](https://github.com/jasoncg), [#3629](https://github.com/yewstack/yew/pull/3629)]
46+
- Fix generic type missing erros in hooks. [[@Michael Meyer](https://github.com/Ichmed), [#3633](https://github.com/yewstack/yew/pull/3633)]
47+
- Better duplicate key diagnostics. [[@WorldSEnder](https://github.com/WorldSEnder), [#3785](https://github.com/yewstack/yew/pull/3785)]
48+
- Fix autocompletion in html macro for rust-analyzer. [[@Moritz Hedtke](https://github.com/mohe2015), [#3829](https://github.com/yewstack/yew/pull/3829)]
49+
- `#[hook]`: `clippy::multiple_bound_locations` lint no longer triggered. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3803](https://github.com/yewstack/yew/pull/3803)]
50+
51+
## ⚙️ Improvements
52+
53+
- Avoid unnecessary scheduling. [[@WorldSEnder](https://github.com/WorldSEnder), [#3935](https://github.com/yewstack/yew/pull/3935)]
54+
- Remove the dependency on `boolinator`. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3420](https://github.com/yewstack/yew/pull/3420)]
55+
- Avoid string copy for Key: From<String> implementation. [[@flumm](https://github.com/flumm), [#3858](https://github.com/yewstack/yew/pull/3858)]
56+
- Switch to tokise from tokio [[@Elina](https://github.com/ranile), [#3776](https://github.com/yewstack/yew/pull/3776)]
57+
- use_future_with: simplify code a bit by using read-only use_memo rather than use_state. [[@Léo Gaspard](https://github.com/Ekleog), [#3610](https://github.com/yewstack/yew/pull/3610)]
3258

33-
## ✨ yew-router **0.19.0** *(2024-10-14)*
59+
## 📝 Documentation
3460

35-
#### Changelog
61+
- website: modernise the Yew usage in the tutorial. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3882](https://github.com/yewstack/yew/pull/3882)]
62+
- website: make tutorial testable. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3879](https://github.com/yewstack/yew/pull/3879)]
63+
- fix the docs of use_prepared_state. [[@Tim Kurdov](https://github.com/its-the-shrimp), [#3881](https://github.com/yewstack/yew/pull/3881)]
64+
- Update tutorial placeholder image generator. [[@Nashwan Azhari](https://github.com/aznashwan), [#3830](https://github.com/yewstack/yew/pull/3830)]
65+
- Refactor(NavbarItem): improve readability and maintainability. [[@Brilliantkid](https://github.com/brilliantkid87), [#3763](https://github.com/yewstack/yew/pull/3763)]
66+
- Fix website search. [[@Muhammad Hamza](https://github.com/ranile), [#3522](https://github.com/yewstack/yew/pull/3522)]
67+
- Addition and improvements to example crates. [[@Oliver Bilbie](https://github.com/Oliver-Bilbie), [#3587](https://github.com/yewstack/yew/pull/3587)] [[@Astariul](https://github.com/astariul), [#3631](https://github.com/yewstack/yew/pull/3631)] [[@Yann Dirson](https://github.com/ydirson), [#3570](https://github.com/yewstack/yew/pull/3570)] [[@Cecile Tonglet](https://github.com/cecton), [#3505](https://github.com/yewstack/yew/pull/3505)] [[@Kaede Hoshikawa](https://github.com/futursolo), [#3436](https://github.com/yewstack/yew/pull/3436)]
68+
- Wording and typo fixes. [[@Waldir Pimenta](https://github.com/waldyrious), [#3754](https://github.com/yewstack/yew/pull/3754)] [[@Jupp56](https://github.com/Jupp56), [#3429](https://github.com/yewstack/yew/pull/3429)] [[@Flavio Moreira](https://github.com/fdvmoreira), [#3418](https://github.com/yewstack/yew/pull/3418)] [[@ronanM](https://github.com/ronanM), [#3413](https://github.com/yewstack/yew/pull/3413)] [[@Waldir Pimenta](https://github.com/waldyrious), [#3754](https://github.com/yewstack/yew/pull/3754)] [[@Damien Lachaume](https://github.com/dlachaume), [#3790](https://github.com/yewstack/yew/pull/3790)] [[@Edwin Amsler](https://github.com/RandomInsano), [#3788](https://github.com/yewstack/yew/pull/3788)] [[@Tushar GH](https://github.com/Tushar12222), [#3585](https://github.com/yewstack/yew/pull/3585)] [[@zhengwu](https://github.com/rockyzhengwu), [#3574](https://github.com/yewstack/yew/pull/3574)] [[@Raahim Fareed](https://github.com/raahimfareed), [#3539](https://github.com/yewstack/yew/pull/3539)] [[@gcmutator](https://github.com/gcmutator), [#3628](https://github.com/yewstack/yew/pull/3628)] [[@Raphael Martin Schindler](https://github.com/rmschindler), [#3605](https://github.com/yewstack/yew/pull/3605)] [[@Jonathan Picques](https://github.com/JonathanPicques), [#3448](https://github.com/yewstack/yew/pull/3448)] [[@Ikko Eltociear Ashimine](https://github.com/eltociear), [#3432](https://github.com/yewstack/yew/pull/3432)] [[@Daniel Sousa](https://github.com/moyeah), [#3425](https://github.com/yewstack/yew/pull/3425)]
3669

37-
## 🛠 Fixes
3870

39-
- Fix CI. [[@Tomoaki Kawada](https://github.com/kawadakk), [#3679](https://github.com/yewstack/yew/pull/3679)]
71+
## ✨ yew-router **0.19.0** *(2025-12-08)*
72+
73+
#### Changelog
4074

4175
## ⚡️ Features
4276

43-
- Raise MSRV to 1.76. [[@Elina](https://github.com/ranile), [#3693](https://github.com/yewstack/yew/pull/3693)]
77+
- Introduce `FromQuery` and `IntoQuery` traits. [[@Robert Schütte](https://github.com/Roba1993), [#3565](https://github.com/yewstack/yew/pull/3565)]
78+
- Dynamic basename support. [[@Finn Bear](https://github.com/finnbear), [#3725](https://github.com/yewstack/yew/pull/3725)]
79+
80+
## 🚨 Breaking changes
81+
82+
- **MSRV raised to 1.84.0.** [[@Siyuan Yan](https://github.com/Madoshakalaka), [#3900](https://github.com/yewstack/yew/pull/3900)]
4483

45-
## ✨ yew-agent **0.4.0** *(2024-10-14)*
84+
## ✨ yew-agent **0.4.0** *(2025-12-08)*
4685

4786
#### Changelog
4887

88+
## 🛠 Fixes
89+
90+
- Fix calls of the disconnected method of on every render. [[@Shihpin Tseng](https://github.com/deftsp), [#3435](https://github.com/yewstack/yew/pull/3435)]
91+
4992
## ⚡️ Features
5093

51-
- Raise MSRV to 1.76. [[@Elina](https://github.com/ranile), [#3693](https://github.com/yewstack/yew/pull/3693)]
52-
- Agent: Avoiding clone of WorkerBridge and WorkerProviderState. [[@Shihpin Tseng](https://github.com/deftsp), [#3435](https://github.com/yewstack/yew/pull/3435)]
94+
- **Support module type web worker.** [[@Luca Cappelletti](https://github.com/LucaCappelletti94), [#3859](https://github.com/yewstack/yew/pull/3859)]
95+
96+
## 🚨 Breaking changes
97+
98+
- **MSRV raised to 1.84.0.** [[@Siyuan Yan](https://github.com/Madoshakalaka), [#3900](https://github.com/yewstack/yew/pull/3900)]
5399

54100
----
55101

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tag = false
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
title: Yew 0.22 - For Real This Time
3+
authors: [mattuwu]
4+
---
5+
6+
The Yew team is thrilled to announce the release of Yew 0.22! After a longer-than-expected journey, this release brings significant improvements to ergonomics, performance, and developer experience.
7+
8+
<!--truncate-->
9+
10+
## Highlights
11+
12+
### New `#[component]` Attribute
13+
14+
The `#[function_component]` attribute has been renamed to `#[component]` for brevity:
15+
16+
```rust
17+
// Before
18+
#[function_component]
19+
fn MyComponent() -> Html {
20+
html! { <div>{"Hello!"}</div> }
21+
}
22+
23+
// After (0.22+)
24+
#[component]
25+
fn MyComponent() -> Html {
26+
html! { <div>{"Hello!"}</div> }
27+
}
28+
```
29+
30+
The old `#[function_component]` attribute is deprecated but still works, giving you time to migrate.
31+
32+
### For-Loops in `html!`
33+
34+
You can now use for-loops directly in the `html!` macro, making iteration more natural:
35+
36+
```rust
37+
// Before - using iterator adapters
38+
html! {
39+
<ul>
40+
{ for items.iter().map(|item| html! { <li>{ item }</li> }) }
41+
</ul>
42+
}
43+
44+
// After (0.22+) - native for-loop syntax
45+
html! {
46+
<ul>
47+
for item in items {
48+
<li>{ item }</li>
49+
}
50+
</ul>
51+
}
52+
```
53+
54+
### MSRV Raised to 1.84.0
55+
56+
The minimum supported Rust version is now **1.84.0**. This allows us to use newer language features and provide better error messages.
57+
58+
### WASI Support for SSR
59+
60+
Server-side rendering now works on WASI targets. See the [original 0.22 announcement](/blog/2024/10/14/release-0-22) for details.
61+
62+
### Better Cloning Ergonomics
63+
64+
- `ImplicitClone` is implemented for more yew types. This means less `&` and `*` and `.clone()` clutter in the html macro.
65+
66+
### yew-agent: Vendored gloo-workers
67+
68+
The `yew-agent` crate now includes its own web worker implementation, removing the external dependency on `gloo-worker`. This also adds support for **module-type web workers**:
69+
70+
```rust
71+
let spawner = WorkerSpawner::<MyWorker>::new()
72+
.as_module(true) // Use ES module workers
73+
.spawn();
74+
```
75+
76+
### yew-router: Query Parameter Traits
77+
78+
The `FromQuery` and `ToQuery` traits from gloo are now re-exported via `yew_router::query` for more flexible query parameter handling, along with dynamic basename support.
79+
80+
## Migration Guide
81+
82+
See the [migration guide](/docs/next/migration-guides/yew/from-0_21_0-to-0_22_0) for detailed instructions on upgrading from 0.21.
83+
84+
## Contributors
85+
86+
Many thanks to everyone who contributed to this release! Special thanks to:
87+
88+
- [@WorldSEnder](https://github.com/WorldSEnder) for hydration fixes
89+
- [@its-the-shrimp](https://github.com/its-the-shrimp) for html macro enhancements
90+
- [@Kirill Semyonkin](https://github.com/kirillsemyonkin) for implicit clone library improvements
91+
- [@langyo](https://github.com/langyo) for WASI SSR support
92+
- [@cecton](https://github.com/cecton) for implicit clone improvements and ergonomics
93+
- [@ranile](https://github.com/ranile) for property improvements
94+
95+
And all the other contributors who helped make this release possible!
96+
97+
## What's Next
98+
99+
We're continuing to work on improving Yew's performance, developer experience, and documentation. Join us on [Discord](https://discord.gg/VQck8X4) to get involved!
100+
101+
See the [full changelog](https://github.com/yewstack/yew/blob/master/CHANGELOG.md) for all changes.

website/blog/authors.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ langyo:
99
title: Contributor of Yew
1010
url: https://github.com/langyo
1111
image_url: https://github.com/langyo.png
12+
13+
mattuwu:
14+
name: Mattuwu
15+
title: Maintainer of Yew
16+
url: https://github.com/Madoshakalaka
17+
image_url: https://github.com/Madoshakalaka.png
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: 'From 0.3.0 to 0.4.0'
3+
---
4+
5+
## MSRV raised to 1.84.0
6+
7+
The minimum supported Rust version is now **1.84.0**. Update your toolchain:
8+
9+
```bash
10+
rustup update stable
11+
```
12+
13+
## gloo-worker vendored
14+
15+
The external dependency on `gloo-worker` has been removed. All worker functionality is now built into `yew-agent`.
16+
17+
### Update imports
18+
19+
If you were importing types from `gloo-worker`, update to import from `yew_agent`:
20+
21+
```rust ,ignore
22+
// Before
23+
use gloo_worker::{Spawnable, Worker, WorkerScope};
24+
25+
// After
26+
use yew_agent::prelude::*;
27+
// or
28+
use yew_agent::{Spawnable, Worker, WorkerScope};
29+
```
30+
31+
### Codec trait
32+
33+
The `Codec` trait is now defined in `yew-agent`:
34+
35+
```rust ,ignore
36+
// Before
37+
use gloo_worker::Codec;
38+
39+
// After
40+
use yew_agent::Codec;
41+
```

0 commit comments

Comments
 (0)