MINIMAL

Moon instances are composed of data and a view to display the data. Actions performed through the view update the data along with the view. The view is defined with the Moon view language — a minimalistic template language allowing powerful interpolation and logic. The data is defined with a JavaScript object containing values of any type.

<p>{text}</p>
<input type="text" @bind={text} />
Moon({
	root: "#root",
	text: "Hello Moon!"
});

FAST

Moon instances are compiled from the Moon view language to lower level JavaScript DOM operations. Moon generates code to first create and initialize your application. At compile-time, Moon can identify the dynamic parts of your application and generate code to update them when needed at runtime.

<p>Static content.</p>
<p>Dynamic content: {dynamic}</p>
function update() {
	m.stc(m6, instance.dynamic);
}