I need to perform a Search when user stops typing.I know I am supposed to use setTimeout() . But with Reactjs I cant find how it works. Can
Another way that worked with me:
class Search extends Component {
  constructor(props){
    super(props);
    this.timeout =  0;
  }
  doSearch(evt){
    var searchText = evt.target.value; // this is the search text
    if(this.timeout) clearTimeout(this.timeout);
    this.timeout = setTimeout(() => {
      //search function
    }, 300);
  }
   render() {
    return (
      
        
         this.doSearch(evt)} />
      
    );
  }
}