What's the point of fragment? #722
Answered
by
delucis
inwardmovement
asked this question in
Q&A
-
I don't understand fragments as the output is the same with or without wrapping in This:
Or this:
Both outputs to:
|
Beta Was this translation helpful? Give feedback.
Answered by
delucis
Jun 5, 2022
Replies: 1 comment 2 replies
-
One useful thing is that you can <Fragment set:html={htmlString} /> You can also do that on an HTML element, but fragment lets you inject just the HTML with no wrapper element. Anyone else have any favourite uses? |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
inwardmovement
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One useful thing is that you can
set:html
on a fragment:You can also do that on an HTML element, but fragment lets you inject just the HTML with no wrapper element.
Anyone else have any favourite uses?