UNPKG

react-images-lightbox

Version:

A simple, responsive lightbox component for displaying an array of images with React.js

21 lines (16 loc) 354 B
/** Bind multiple component methods: * @param {this} context * @param {Array} functions constructor() { ... bindFunctions.call(this, ['handleClick', 'handleOther']); } */ "use strict"; module.exports = function bindFunctions(functions) { var _this = this; functions.forEach(function (f) { return _this[f] = _this[f].bind(_this); }); };