JSFiddle - React, Tailwind, and code Playground

HTML

<div id="click">Click</div>

CSS

#click {
    background-color: #ff0;
}

JavaScript

myData = {
    'color': "red",
    'makeRed': function(){
        $(this).css("color",myData.color);
    },
    'reset': function(){
        $(this).css("color","");
    },
    'init': function(){
        var self = this;
        $("#click").hover(this.makeRed,this.reset);
    }
};

myData.init();