Skip to content

0.2.1 theory conditions

Ivan S Glazunov edited this page Feb 20, 2015 · 2 revisions

theory about conditions

Short

var user = 'ivan';
div()(user? user : 'undefined')
<div>ivan</div>

Fully

var user = 'ivan';
div()(asSync(function() {
	if (user) return span()(user);
	else return span;
}));
<div><span>ivan</span></div>
Clone this wiki locally