JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<div id="test" data-bind="attr: { 'data-whatever': isChecked }">

CSS

div {
    height: 100px;
    width: 100px;
    background-color: green;
    
}

JavaScript

var vm = {
    isChecked : ko.observable("one")
};


$(function() {
    ko.applyBindings(vm);
    console.log($('#test').data('whatever'));
    $('#test').data('whatever', 'two');
    console.log($('#test').data('whatever'));
});