| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 4× 4× 4× 1× 4× | import React, { Component } from 'react';
export default class Base extends Component {
constructor(props) {
super(props);
this.el = React.Children.only(props.children);
this.handlersToWrap = props.handler.length ? [props.handler] : props.handlers;
}
componentWillUnmount() {
this._throttler.destroy();
}
render = () => this._throttler.element();
}
|