JSFiddle - React, Tailwind, and code Playground

HTML

<ul data-bind="foreach: Items">
<li data-bind="text: $data"></li>
</ul>
<button data-bind="click: Randomize">Randomize</button>

JavaScript

var viewModel = new(function() {
    var self = this;
    self.Items = ko.observableArray([1, 2, 3, 4, 5, 6, 7, 8, 9]);
    self.Randomize = function() {
        self.Items().sort(function() {
            return Math.random() > Math.random();
        });
        
        self.Items.valueHasMutated();
    }
})();
ko.applyBindings(viewModel);