Tuesday, 26 September 2017

Add document/dom level java script event in Type Script

componentDidMount() {
        const dom = ReactDOM.findDOMNode(this);
        dom.addEventListener('mousedown', e => this.handleMouseDown(e));
}

 public handleMouseDown(e: any): void
 {
        alert(e.target.value);
 }