JSFiddle - React, Tailwind, and code Playground
by rpuri
HTML
<span id='health'></span>
<input type="text" id="input-health" />
JavaScript
var ViewModel = function () {
this.status = ko.observable("good");
};
var vm = new ViewModel();
ko.applyBindingsToNode(document.getElementById('health'), {
text: vm.status(),
valueUpdate: 'afterkeydown'
});
ko.applyBindingsToNode(document.getElementById('input-health'), {
value: vm.status(),
valueUpdate: 'afterkeydown'
});