mirror of
https://github.com/yewstack/yew.git
synced 2025-12-08 21:26:25 +00:00
* Add key docs * add frogments to sodebar * remove duplicate title * Apply suggestions from code review Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk> * Apply suggestions from code review Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com> * remove html comments Co-authored-by: mc1098 <m.cripps1@uni.brighton.ac.uk> Co-authored-by: Muhammad Hamza <muhammadhamza1311@gmail.com>
409 B
409 B
| title |
|---|
| 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::html;
html! {
<>
<div></div>
<p></p>
</>
};
use yew::html;
/* error: only one root html element allowed */
html! {
<div></div>
<p></p>
};