JSFiddle - React, Tailwind, and code Playground
HTML
<h1>ko 2.2.0</h1>
<p>click in the input field and press arrow down...</p> <p><strong>write occurs</strong></p>
<input data-bind="value: query, valueUpdate: 'afterkeydown'"/>
<div data-bind="text: query"></div>
<span>Subscribed non-computed</span>
<input data-bind="value: test, valueUpdate: 'afterkeydown'" />
JavaScript
var model=function(){
var self=this;
this.backingField = ko.observable("");
this.query = ko.computed({read:function(){
return self.backingField();
},write:function(v){
alert("write");
self.backingField(v);
}});
this.test = ko.observable('');
this.test.subscribe(function(newValue) {
alert("The test value new name is " + newValue);
});
}
var m=new model();
ko.applyBindings(m);