Skip to content

When to use Show/Switch/Match? #392

Answered by ryansolid
zhaoyao91 asked this question in Q&A
Discussion options

You must be logged in to vote

Yeah added optimization for the ternary and boolean syntax so they are mostly the same now. You can do keyed modes (where it full replaces children) with the components by having callback children. Switch/Match is a bit cleaner when you have more than 2 outcomes. I do find in general since it avoids { } it makes code cleaner, but that is a preference thing.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zhaoyao91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants