react-rainbow
react-rainbow copied to clipboard
create bind util method
Description:
instead of binding manually all methods in constructor like:
this.handleScrollDownArrowHover = this.handleScrollDownArrowHover.bind(this); this.handleScrollUpArrowHover = this.handleScrollUpArrowHover.bind(this);
we can:
bind({ methods: [ 'handleScrollDownArrowHover', 'handleScrollUpArrowHover', ], to: this, });