JSFiddle - React, Tailwind, and code Playground
by rich_harris
HTML
<div id="container"></div>
JavaScript
var ractive = new Ractive({
el: '#container',
template: 'a: <input value="{{a}}"><br>b: <input value="{{b}}">',
data: {
a: 'alpha',
b: 'beta'
},
oninit: function(){
this.observe('a', function(val){
alert('@oninit ' + val);
}, { init: false })
},
oncomplete: function(){
this.observe('a', function(val){
alert('@oncomplete ' + val + missingVar4);
}, { init: false })
}
});