# Changelog
## ✨ **0.10** *(TBD)*
- #### ⚡️ Features
- #### 🛠 Fixes
- #### 🚨 Breaking changes
## ✨ **0.9** *(2019-09-24)*
- #### ⚡️ Features
- Components can now accept children in the `html!` macro. [[@jstarry], [#589](https://github.com/yewstack/yew/pull/589)]
```rust
// app.rs
html! {
}
```
```rust
// my_list.rs
use yew::prelude::*;
pub struct MyList(Props);
#[derive(Properties)]
pub struct Props {
#[props(required)]
pub name: String,
pub children: Children,
}
impl Renderable for MyList {
fn view(&self) -> Html {
html! {{
self.props.children.iter().collect::>()
}}
}
}
```
- Iterators can now be rendered in the `html!` macro without using the `for` keyword. [[@hgzimmerman], [#622](https://github.com/yewstack/yew/pull/622)]
Before:
```rust
html! {{
for self.props.items.iter().map(renderItem)
}}
```
After:
```rust
html! {{
self.props.items.iter().map(renderItem).collect::>()
}}
```
- Closures are now able to be transformed into optional `Callback` properties. [[@Wodann], [#612](https://github.com/yewstack/yew/pull/612)]
- Improved CSS class ergonomics with new `Classes` type. [[@DenisKolodin], [#585](https://github.com/yewstack/yew/pull/585)], [[@hgzimmerman], [#626](https://github.com/yewstack/yew/pull/626)]
- Touch events are now supported `
` [[@boydjohnson], [#584](https://github.com/yewstack/yew/pull/584)], [[@jstarry], [#656](https://github.com/yewstack/yew/pull/656)]
- The `Component` trait now has an `mounted` method which can be implemented to react to when your components have been mounted to the DOM. [[@hgzimmerman], [#583](https://github.com/yewstack/yew/pull/583)]
- Additional Fetch options `mode`, `cache`, and `redirect` are now supported [[@davidkna], [#579](https://github.com/yewstack/yew/pull/579)]
- The derive props macro now supports Properties with lifetimes [[@jstarry], [#580](https://github.com/yewstack/yew/pull/580)]
- New `ResizeService` for registering for `window` size updates [[@hgzimmerman], [#577](https://github.com/yewstack/yew/pull/577)]
- #### 🛠 Fixes
- Fixed `VNode` orphaning bug when destroying `VTag` elements. This caused some `Component`s to not be properly destroyed when they should have been. [[@hgzimmerman], [#651](https://github.com/yewstack/yew/pull/651)]
- Fix mishandling of Properties `where` clause in derive_props macro [[@astraw], [#640](https://github.com/yewstack/yew/pull/640)]
- #### 🚨 Breaking changes
None
## ✨ **0.8** *(2019-08-10)*
***Props! Props! Props!***
This release introduces a more developer friendly way to handle your `Component` props. Use the new `#[derive(Properties)]` macro to beef up your props! Property values can now be annotated as `#[props(required)]` which will enforce that props are present at compile time. This means that your props struct no longer needs to implement `Default`, so time to clean up all of those prop values you wrapped in `Option` to have a default value.
- #### ⚡️ Features
- `html!` - Self-closing html tags can now be used: `` [[@totorigolo], [#523](https://github.com/yewstack/yew/pull/523)]
- `html!` - SVG name-spaced tags are now supported! [[@jstarry], [#550](https://github.com/yewstack/yew/pull/550)]
- Properties can now be required at compile time [[@jstarry], [#553](https://github.com/yewstack/yew/pull/525)]
- App components can now be mounted with properties [[@jstarry], [#567](https://github.com/yewstack/yew/pull/567)]
- Apps can now be mounted as the `` tag [[@jstarry], [@kellytk], [#540](https://github.com/yewstack/yew/pull/540)]
- Content editable elements can now trigger `oninput` events [[@tiziano88], [#549](https://github.com/yewstack/yew/pull/549)]
- #### 🛠 Fixes
- `html!` - Class name order is now preserved which unlocks the use of Semantic UI [[@charvp], [#424](https://github.com/yewstack/yew/pull/424)]
- `html!` - Dashed tag names and properties are supported [[@jstarry], [#512](https://github.com/yewstack/yew/pull/512), [#550](https://github.com/yewstack/yew/pull/550)]
- `html!` - All rust keywords can be used as tag attributes [[@jstarry], [#550](https://github.com/yewstack/yew/pull/550)]
- `html!` - Support `Callback` closure with explicit return type [[@totorigolo], [#564](https://github.com/yewstack/yew/pull/564)]
- `html!` - Fixed edge case where `>` token would break parser [[@totorigolo], [#565](https://github.com/yewstack/yew/pull/565)]
- Performance improvement to the diff engine [[@totorigolo], [#539](https://github.com/yewstack/yew/pull/539)]
- `Properties` no longer need to implement the `PartialEq`, `Clone`, or `Default` traits [[@jstarry], [#553](https://github.com/yewstack/yew/pull/553)]
- `Component` will not panic if the `change` method is unimplemented [[@jstarry], [#554](https://github.com/yewstack/yew/pull/554)]
- #### 🚨 Breaking changes
- The `Component::Properties` associated type must implement the new `Properties` trait [[@jstarry], [#553](https://github.com/yewstack/yew/pull/553)]
The new `Properties` trait is what powers the ability to check required props are present at compile time. Use the derive props macro to implement automatically.
```rust
use yew::Properties;
#[derive(Properties)]
pub struct Props {
#[props(required)]
pub value: MyStruct,
}
```
- `Callback` props no longer transform into `Option` types [[@jstarry], [#553](https://github.com/yewstack/yew/pull/553)]
```rust
html! { }
```
***before:***
```rust
#[derive(PartialEq, Clone, Default)]
pub struct Props {
on_click: Option>,
}
```
***after:*** *note the `#[props(required)]` attribute*
```rust
#[derive(PartialEq, Properties)]
pub struct Props {
#[props(required)]
on_click: Callback<()>,
}
```
## ✨ **0.7** *(2019-07-19)*
***Commas? We don't need no stinkin' commas!***
This release brings a new and improved `html!` macro for writing JSX-like syntax. Commas and colons are no longer necessary now that the macro is written as a procedural macro.
- #### ⚡️ Features
- `html!{}` is now valid syntax and can be used to render nothing [[@jstarry], [#500](https://github.com/yewstack/yew/pull/500)]
- Apps can now be built without `cargo-web` using `wasm-bindgen` [[@jstarry], [#497](https://github.com/yewstack/yew/pull/497)]
- `Callback` now implements `Debug` [[@DenisKolodin], [#485](https://github.com/yewstack/yew/pull/485)]
- New utility method for getting the `host` of the current page [[@DenisKolodin], [#509](https://github.com/yewstack/yew/pull/509)]
- #### 🛠 Fixes
- `html!` - Commas are no longer necessary for splitting up attributes [[@jstarry], [#500](https://github.com/yewstack/yew/pull/500)]
- `html!` - Colons are no longer necessary for denoting a `Component` tag [[@jstarry], [#500](https://github.com/yewstack/yew/pull/500)]
- Textarea value can be now be set: `