JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://raw.github.com/melanke/Watch.JS/master/src/watch.js"></script>

JavaScript

//defining our object however we like
var ex6 = {
    attr1: 0,
    attr2: 1
};

//defining a 'watcher' for the object
watch(ex6, "attr3", function(){
    alert("some attribute of ex6 changes!")
});

ex6.attr3 = "value"; //no watcher will be invoked