JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://rawgithub.com/melanke/Watch.JS/master/src/watch.js"></script>
JavaScript
//open the browser log to view the messages
//creating class
var A = function(){
this.propA = 'valA';
}
//creating class instance
var a = new A();
//try to watch
watch(a, function(prop, action, newvalue, oldvalue){
console.log('a changes', prop, action, newvalue, oldvalue, this);
}, 0, true);
//set properties
a.propA = 5;
a.propB = 6;