UNPKG

react-youtube-playlist

Version:

A react component for displaying the contents of a user's YouTube playlist.

31 lines (22 loc) 849 B
'use strict'; exports.__esModule = true; var _createUncontrollable = require('./createUncontrollable'); var _createUncontrollable2 = _interopRequireDefault(_createUncontrollable); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var mixin = { shouldComponentUpdate: function shouldComponentUpdate() { //let the forceUpdate trigger the update return !this._notifying; } }; function set(component, propName, handler, value, args) { if (handler) { component._notifying = true; handler.call.apply(handler, [component, value].concat(args)); component._notifying = false; } component._values[propName] = value; if (!component.unmounted) component.forceUpdate(); } exports.default = (0, _createUncontrollable2.default)(mixin, set); module.exports = exports['default'];