21 lines
331 B
Plaintext

class {
onInput(input) {
this.state = {
error: null
};
}
submit() {
var self = this;
setTimeout(function() {
self.state.error = "FATAL ERROR";
}, 50);
}
}
<form on-submit("submit")>
<if(state.error)>
<p>FATAL ERROR</p>
</if>
</form>