JSFiddle - React, Tailwind, and code Playground
JavaScript
function example(){
this.state = {a:1};
}
function other(){
this.print = function(){ console.log(this.state) };
}
var example = new example();
var other = new other();
var binded = other.print.bind(example); // create a method
binded(); // run the new method that bind created
other.print.call(example); // call the method with example as this.
other.print(); // this will be the window and it has no state -> undefind