MCPcopy Create free account
hub / github.com/docker/getting-started / Consumer

Function Consumer

app/src/static/js/react-bootstrap.js:8590–8610  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8588 _inherits(Consumer, _Component2);
8589
8590 function Consumer() {
8591 var _temp2, _this2, _ret2;
8592
8593 _classCallCheck(this, Consumer);
8594
8595 for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
8596 args[_key2] = arguments[_key2];
8597 }
8598
8599 return _ret2 = (_temp2 = (_this2 = _possibleConstructorReturn(this, _Component2.call.apply(_Component2, [this].concat(args))), _this2), _this2.state = {
8600 value: _this2.getValue()
8601 }, _this2.onUpdate = function (newValue, changedBits) {
8602 var observedBits = _this2.observedBits | 0;
8603
8604 if ((observedBits & changedBits) !== 0) {
8605 _this2.setState({
8606 value: _this2.getValue()
8607 });
8608 }
8609 }, _temp2), _possibleConstructorReturn(_this2, _ret2);
8610 }
8611
8612 Consumer.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
8613 var observedBits = nextProps.observedBits;

Callers

nothing calls this directly

Calls 2

_classCallCheckFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…