Skip to main content
Version: Next

Fragments

The html! macro always requires a single root node. In order to get around this restriction, you can use an "empty tag" (these are also called "fragments").

use yew::prelude::*;

html! {
<>
<div></div>
<p></p>
</>
};