Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
if (!this.state.hasElem) return;
this.target = this.props.targetGetter();
this.reflow();
//add throttle
this._layoutEventsToken = LayoutEvents.addListener(this.reflow);
}