Hacker News new | ask | show | jobs
by doctor_eval 1073 days ago
How would you do it?
2 comments

I don't know should I stick to mustaches (it can be dictated by other reasons), but if I should: {#if expr} {#elseif expr} {#endif}
These sigils seem to exist to make it easier to balance the expressions. I personally find {#if} … {/if} much more intuitive. {:else} is an unfortunate compromise necessitated by the fact that elseif is ugly in most imperative languages.
I much prefer keeping everything XML-ish:

https://www.solidjs.com/docs/latest/api#switchmatch