JSFiddle - React, Tailwind, and code Playground
HTML
Nombre: <input type="text" data-bind="value: Nombre" /><br />
Primer apellido <input type="text" data-bind="value: PrimerApellido" /><br />
Hola <span data-bind="text: Mensaje"></span ><br />
JavaScript
function ViewModel() {
var self = this;
self.Nombre= ko.observable("John");
self.PrimerApellido= ko.observable("Doe");
self.Mensaje= ko.computed(function() {
return this.Nombre() + " " + this.PrimerApellido();
}, this);
}
// Activates knockout.js
ko.applyBindings(new ViewModel());