If / Else
If else works identically to how it does in C#, the added optional ability to be declared as destructive
template IfElseSample(required bool someCondition, required bool someOtherCondition) render {
if(someCondition) {
Text("one");
}
else if(someOtherCondition) {
Text("two");
}
else {
Text("three");
}
}
template IfElseSampleDestructive(required bool someCondition, required bool someOtherCondition) render {
if:destructive(someCondition) {
Text("one");
}
else if(someOtherCondition) {
Text("two");
}
else {
Text("three");
}
}