react-dom 16.3.1 → 16.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- /** @license React v16.3.1
1
+ /** @license React v16.3.2
2
2
  * react-dom.development.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -15,13 +15,6 @@
15
15
  (global.ReactDOM = factory(global.React));
16
16
  }(this, (function (React) { 'use strict';
17
17
 
18
- /**
19
- * WARNING: DO NOT manually require this module.
20
- * This is a replacement for `invariant(...)` used by the error code system
21
- * and will _only_ be required by the corresponding babel pass.
22
- * It always throws.
23
- */
24
-
25
18
  /**
26
19
  * Copyright (c) 2013-present, Facebook, Inc.
27
20
  *
@@ -76,6 +69,9 @@ function invariant(condition, format, a, b, c, d, e, f) {
76
69
 
77
70
  var invariant_1 = invariant;
78
71
 
72
+ // Relying on the `invariant()` implementation lets us
73
+ // have preserve the format and params in the www builds.
74
+
79
75
  !React ? invariant_1(false, 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.') : void 0;
80
76
 
81
77
  var invokeGuardedCallback = function (name, func, context, a, b, c, d, e, f) {
@@ -569,7 +565,7 @@ var injection$1 = {
569
565
  getNodeFromInstance = Injected.getNodeFromInstance;
570
566
 
571
567
  {
572
- warning_1(getNodeFromInstance && getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');
568
+ !(getNodeFromInstance && getInstanceFromNode) ? warning_1(false, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
573
569
  }
574
570
  }
575
571
  };
@@ -591,7 +587,7 @@ var validateEventDispatches = void 0;
591
587
  var instancesIsArr = Array.isArray(dispatchInstances);
592
588
  var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
593
589
 
594
- warning_1(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.');
590
+ !(instancesIsArr === listenersIsArr && instancesLen === listenersLen) ? warning_1(false, 'EventPluginUtils: Invalid `event`.') : void 0;
595
591
  };
596
592
  }
597
593
 
@@ -1144,7 +1140,7 @@ function listenerAtPhase(inst, event, propagationPhase) {
1144
1140
  */
1145
1141
  function accumulateDirectionalDispatches(inst, phase, event) {
1146
1142
  {
1147
- warning_1(inst, 'Dispatching inst must not be null');
1143
+ !inst ? warning_1(false, 'Dispatching inst must not be null') : void 0;
1148
1144
  }
1149
1145
  var listener = listenerAtPhase(inst, event, phase);
1150
1146
  if (listener) {
@@ -1552,7 +1548,7 @@ SyntheticEvent.extend = function (Interface) {
1552
1548
  return new Proxy(constructor.apply(that, args), {
1553
1549
  set: function (target, prop, value) {
1554
1550
  if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
1555
- warning_1(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.');
1551
+ !(didWarnForAddedNewProperty || target.isPersistent()) ? warning_1(false, "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
1556
1552
  didWarnForAddedNewProperty = true;
1557
1553
  }
1558
1554
  target[prop] = value;
@@ -1597,7 +1593,7 @@ function getPooledWarningPropertyDefinition(propName, getVal) {
1597
1593
 
1598
1594
  function warn(action, result) {
1599
1595
  var warningCondition = false;
1600
- warning_1(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);
1596
+ !warningCondition ? warning_1(false, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
1601
1597
  }
1602
1598
  }
1603
1599
 
@@ -2407,6 +2403,13 @@ function getComponentName(fiber) {
2407
2403
  case REACT_RETURN_TYPE:
2408
2404
  return 'ReactReturn';
2409
2405
  }
2406
+ if (typeof type === 'object' && type !== null) {
2407
+ switch (type.$$typeof) {
2408
+ case REACT_FORWARD_REF_TYPE:
2409
+ var functionName = type.render.displayName || type.render.name || '';
2410
+ return functionName !== '' ? 'ForwardRef(' + functionName + ')' : 'ForwardRef';
2411
+ }
2412
+ }
2410
2413
  return null;
2411
2414
  }
2412
2415
 
@@ -3839,7 +3842,7 @@ function isMounted(component) {
3839
3842
  if (owner !== null && owner.tag === ClassComponent) {
3840
3843
  var ownerFiber = owner;
3841
3844
  var instance = ownerFiber.stateNode;
3842
- warning_1(instance._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber) || 'A component');
3845
+ !instance._warnedAboutRefsInRender ? warning_1(false, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber) || 'A component') : void 0;
3843
3846
  instance._warnedAboutRefsInRender = true;
3844
3847
  }
3845
3848
  }
@@ -6075,6 +6078,14 @@ var ReactStrictModeWarnings = {
6075
6078
  var didWarnAboutDeprecatedLifecycles = new Set();
6076
6079
  var didWarnAboutUnsafeLifecycles = new Set();
6077
6080
 
6081
+ var setToSortedString = function (set) {
6082
+ var array = [];
6083
+ set.forEach(function (value) {
6084
+ array.push(value);
6085
+ });
6086
+ return array.sort().join(', ');
6087
+ };
6088
+
6078
6089
  ReactStrictModeWarnings.discardPendingWarnings = function () {
6079
6090
  pendingComponentWillMountWarnings = [];
6080
6091
  pendingComponentWillReceivePropsWarnings = [];
@@ -6097,7 +6108,7 @@ var ReactStrictModeWarnings = {
6097
6108
 
6098
6109
  var formatted = lifecycle.replace('UNSAFE_', '');
6099
6110
  var suggestion = LIFECYCLE_SUGGESTIONS[lifecycle];
6100
- var sortedComponentNames = Array.from(componentNames).sort().join(', ');
6111
+ var sortedComponentNames = setToSortedString(componentNames);
6101
6112
 
6102
6113
  lifecyclesWarningMesages.push(formatted + ': Please update the following components to use ' + (suggestion + ' instead: ' + sortedComponentNames));
6103
6114
  }
@@ -6135,7 +6146,7 @@ var ReactStrictModeWarnings = {
6135
6146
  didWarnAboutDeprecatedLifecycles.add(fiber.type);
6136
6147
  });
6137
6148
 
6138
- var sortedNames = Array.from(uniqueNames).sort().join(', ');
6149
+ var sortedNames = setToSortedString(uniqueNames);
6139
6150
 
6140
6151
  lowPriorityWarning$1(false, 'componentWillMount is deprecated and will be removed in the next major version. ' + 'Use componentDidMount instead. As a temporary workaround, ' + 'you can rename to UNSAFE_componentWillMount.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-async-component-lifecycle-hooks', sortedNames);
6141
6152
 
@@ -6149,7 +6160,7 @@ var ReactStrictModeWarnings = {
6149
6160
  didWarnAboutDeprecatedLifecycles.add(fiber.type);
6150
6161
  });
6151
6162
 
6152
- var _sortedNames = Array.from(_uniqueNames).sort().join(', ');
6163
+ var _sortedNames = setToSortedString(_uniqueNames);
6153
6164
 
6154
6165
  lowPriorityWarning$1(false, 'componentWillReceiveProps is deprecated and will be removed in the next major version. ' + 'Use static getDerivedStateFromProps instead.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-async-component-lifecycle-hooks', _sortedNames);
6155
6166
 
@@ -6163,7 +6174,7 @@ var ReactStrictModeWarnings = {
6163
6174
  didWarnAboutDeprecatedLifecycles.add(fiber.type);
6164
6175
  });
6165
6176
 
6166
- var _sortedNames2 = Array.from(_uniqueNames2).sort().join(', ');
6177
+ var _sortedNames2 = setToSortedString(_uniqueNames2);
6167
6178
 
6168
6179
  lowPriorityWarning$1(false, 'componentWillUpdate is deprecated and will be removed in the next major version. ' + 'Use componentDidUpdate instead. As a temporary workaround, ' + 'you can rename to UNSAFE_componentWillUpdate.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here:' + '\nhttps://fb.me/react-async-component-lifecycle-hooks', _sortedNames2);
6169
6180
 
@@ -6397,6 +6408,7 @@ var shouldIgnoreFiber = function (fiber) {
6397
6408
  case Fragment:
6398
6409
  case ContextProvider:
6399
6410
  case ContextConsumer:
6411
+ case Mode:
6400
6412
  return true;
6401
6413
  default:
6402
6414
  return false;
@@ -7131,7 +7143,7 @@ var ReactFiberClassComponent = function (legacyContext, scheduleWork, computeExp
7131
7143
  stopPhaseTimer();
7132
7144
 
7133
7145
  {
7134
- warning_1(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(workInProgress) || 'Component');
7146
+ !(shouldUpdate !== undefined) ? warning_1(false, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(workInProgress) || 'Component') : void 0;
7135
7147
  }
7136
7148
 
7137
7149
  return shouldUpdate;
@@ -7160,48 +7172,48 @@ var ReactFiberClassComponent = function (legacyContext, scheduleWork, computeExp
7160
7172
  }
7161
7173
 
7162
7174
  var noGetInitialStateOnES6 = !instance.getInitialState || instance.getInitialState.isReactClassApproved || instance.state;
7163
- warning_1(noGetInitialStateOnES6, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);
7175
+ !noGetInitialStateOnES6 ? warning_1(false, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name) : void 0;
7164
7176
  var noGetDefaultPropsOnES6 = !instance.getDefaultProps || instance.getDefaultProps.isReactClassApproved;
7165
- warning_1(noGetDefaultPropsOnES6, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);
7177
+ !noGetDefaultPropsOnES6 ? warning_1(false, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name) : void 0;
7166
7178
  var noInstancePropTypes = !instance.propTypes;
7167
- warning_1(noInstancePropTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
7179
+ !noInstancePropTypes ? warning_1(false, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name) : void 0;
7168
7180
  var noInstanceContextTypes = !instance.contextTypes;
7169
- warning_1(noInstanceContextTypes, 'contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
7181
+ !noInstanceContextTypes ? warning_1(false, 'contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name) : void 0;
7170
7182
  var noComponentShouldUpdate = typeof instance.componentShouldUpdate !== 'function';
7171
- warning_1(noComponentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);
7183
+ !noComponentShouldUpdate ? warning_1(false, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name) : void 0;
7172
7184
  if (type.prototype && type.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
7173
7185
  warning_1(false, '%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(workInProgress) || 'A pure component');
7174
7186
  }
7175
7187
  var noComponentDidUnmount = typeof instance.componentDidUnmount !== 'function';
7176
- warning_1(noComponentDidUnmount, '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
7188
+ !noComponentDidUnmount ? warning_1(false, '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name) : void 0;
7177
7189
  var noComponentDidReceiveProps = typeof instance.componentDidReceiveProps !== 'function';
7178
- warning_1(noComponentDidReceiveProps, '%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);
7190
+ !noComponentDidReceiveProps ? warning_1(false, '%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name) : void 0;
7179
7191
  var noComponentWillRecieveProps = typeof instance.componentWillRecieveProps !== 'function';
7180
- warning_1(noComponentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
7192
+ !noComponentWillRecieveProps ? warning_1(false, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name) : void 0;
7181
7193
  var noUnsafeComponentWillRecieveProps = typeof instance.UNSAFE_componentWillRecieveProps !== 'function';
7182
- warning_1(noUnsafeComponentWillRecieveProps, '%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);
7194
+ !noUnsafeComponentWillRecieveProps ? warning_1(false, '%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name) : void 0;
7183
7195
  var hasMutatedProps = instance.props !== workInProgress.pendingProps;
7184
- warning_1(instance.props === undefined || !hasMutatedProps, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
7196
+ !(instance.props === undefined || !hasMutatedProps) ? warning_1(false, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name) : void 0;
7185
7197
  var noInstanceDefaultProps = !instance.defaultProps;
7186
- warning_1(noInstanceDefaultProps, 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);
7198
+ !noInstanceDefaultProps ? warning_1(false, 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name) : void 0;
7187
7199
 
7188
- if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(type)) {
7200
+ if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(type)) {
7189
7201
  didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(type);
7190
7202
  warning_1(false, '%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(workInProgress));
7191
7203
  }
7192
7204
 
7193
7205
  var noInstanceGetDerivedStateFromProps = typeof instance.getDerivedStateFromProps !== 'function';
7194
- warning_1(noInstanceGetDerivedStateFromProps, '%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
7206
+ !noInstanceGetDerivedStateFromProps ? warning_1(false, '%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
7195
7207
  var noInstanceGetDerivedStateFromCatch = typeof instance.getDerivedStateFromCatch !== 'function';
7196
- warning_1(noInstanceGetDerivedStateFromCatch, '%s: getDerivedStateFromCatch() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
7208
+ !noInstanceGetDerivedStateFromCatch ? warning_1(false, '%s: getDerivedStateFromCatch() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name) : void 0;
7197
7209
  var noStaticGetSnapshotBeforeUpdate = typeof type.getSnapshotBeforeUpdate !== 'function';
7198
- warning_1(noStaticGetSnapshotBeforeUpdate, '%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);
7210
+ !noStaticGetSnapshotBeforeUpdate ? warning_1(false, '%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name) : void 0;
7199
7211
  var _state = instance.state;
7200
7212
  if (_state && (typeof _state !== 'object' || isArray(_state))) {
7201
7213
  warning_1(false, '%s.state: must be set to an object or null', name);
7202
7214
  }
7203
7215
  if (typeof instance.getChildContext === 'function') {
7204
- warning_1(typeof type.childContextTypes === 'object', '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);
7216
+ !(typeof type.childContextTypes === 'object') ? warning_1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name) : void 0;
7205
7217
  }
7206
7218
  }
7207
7219
  }
@@ -8301,7 +8313,7 @@ function ChildReconciler(shouldTrackSideEffects) {
8301
8313
  if (typeof newChildrenIterable.entries === 'function') {
8302
8314
  var possibleMap = newChildrenIterable;
8303
8315
  if (possibleMap.entries === iteratorFn) {
8304
- warning_1(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$2());
8316
+ !didWarnAboutMaps ? warning_1(false, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$2()) : void 0;
8305
8317
  didWarnAboutMaps = true;
8306
8318
  }
8307
8319
  }
@@ -9040,7 +9052,7 @@ var ReactFiberBeginWork = function (config, hostContext, legacyContext, newConte
9040
9052
  var _Component = workInProgress.type;
9041
9053
 
9042
9054
  if (_Component) {
9043
- warning_1(!_Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', _Component.displayName || _Component.name || 'Component');
9055
+ !!_Component.childContextTypes ? warning_1(false, '%s(...): childContextTypes cannot be defined on a functional component.', _Component.displayName || _Component.name || 'Component') : void 0;
9044
9056
  }
9045
9057
  if (workInProgress.ref !== null) {
9046
9058
  var info = '';
@@ -9253,7 +9265,7 @@ var ReactFiberBeginWork = function (config, hostContext, legacyContext, newConte
9253
9265
  } else {
9254
9266
  changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
9255
9267
  {
9256
- warning_1((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);
9268
+ !((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits) ? warning_1(false, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits) : void 0;
9257
9269
  }
9258
9270
  changedBits |= 0;
9259
9271
 
@@ -9307,6 +9319,10 @@ var ReactFiberBeginWork = function (config, hostContext, legacyContext, newConte
9307
9319
  // Context change propagation stops at matching consumers, for time-
9308
9320
  // slicing. Continue the propagation here.
9309
9321
  propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
9322
+ } else if (oldProps === newProps) {
9323
+ // Skip over a memoized parent with a bitmask bailout even
9324
+ // if we began working on it because of a deeper matching child.
9325
+ return bailoutOnAlreadyFinishedWork(current, workInProgress);
9310
9326
  }
9311
9327
  // There is no bailout on `children` equality because we expect people
9312
9328
  // to often pass a bound method as a child, but it may reference
@@ -9315,7 +9331,7 @@ var ReactFiberBeginWork = function (config, hostContext, legacyContext, newConte
9315
9331
  var render = newProps.children;
9316
9332
 
9317
9333
  {
9318
- warning_1(typeof render === 'function', 'A context consumer was rendered with multiple children, or a child ' + "that isn't a function. A context consumer expects a single child " + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');
9334
+ !(typeof render === 'function') ? warning_1(false, 'A context consumer was rendered with multiple children, or a child ' + "that isn't a function. A context consumer expects a single child " + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.') : void 0;
9319
9335
  }
9320
9336
 
9321
9337
  var newChildren = render(newValue);
@@ -9470,7 +9486,7 @@ var ReactFiberCompleteWork = function (config, hostContext, legacyContext, newCo
9470
9486
 
9471
9487
  function markUpdate(workInProgress) {
9472
9488
  // Tag the fiber with an update effect. This turns a Placement into
9473
- // an UpdateAndPlacement.
9489
+ // a PlacementAndUpdate.
9474
9490
  workInProgress.effectTag |= Update;
9475
9491
  }
9476
9492
 
@@ -11483,7 +11499,7 @@ var ReactFiberNewContext = function (stack) {
11483
11499
  context._changedBits = providerFiber.stateNode;
11484
11500
 
11485
11501
  {
11486
- warning_1(context._currentRenderer === null || context._currentRenderer === rendererSigil, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');
11502
+ !(context._currentRenderer === null || context._currentRenderer === rendererSigil) ? warning_1(false, 'Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.') : void 0;
11487
11503
  context._currentRenderer = rendererSigil;
11488
11504
  }
11489
11505
  }
@@ -12433,8 +12449,19 @@ var ReactFiberScheduler = function (config) {
12433
12449
  }
12434
12450
 
12435
12451
  function computeInteractiveExpiration(currentTime) {
12436
- // Should complete within ~500ms. 600ms max.
12437
- var expirationMs = 500;
12452
+ var expirationMs = void 0;
12453
+ // We intentionally set a higher expiration time for interactive updates in
12454
+ // dev than in production.
12455
+ // If the main thread is being blocked so long that you hit the expiration,
12456
+ // it's a problem that could be solved with better scheduling.
12457
+ // People will be more likely to notice this and fix it with the long
12458
+ // expiration time in development.
12459
+ // In production we opt for better UX at the risk of masking scheduling
12460
+ // problems, by expiring fast.
12461
+ {
12462
+ // Should complete within ~500ms. 600ms max.
12463
+ expirationMs = 500;
12464
+ }
12438
12465
  var bucketSizeMs = 100;
12439
12466
  return computeExpirationBucket(currentTime, expirationMs, bucketSizeMs);
12440
12467
  }
@@ -13113,7 +13140,7 @@ var ReactFiberReconciler$1 = function (config) {
13113
13140
 
13114
13141
  callback = callback === undefined ? null : callback;
13115
13142
  {
13116
- warning_1(callback === null || typeof callback === 'function', 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
13143
+ !(callback === null || typeof callback === 'function') ? warning_1(false, 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback) : void 0;
13117
13144
  }
13118
13145
 
13119
13146
  var update = {
@@ -13157,7 +13184,15 @@ var ReactFiberReconciler$1 = function (config) {
13157
13184
  return scheduleRootUpdate(current, element, currentTime, expirationTime, callback);
13158
13185
  }
13159
13186
 
13160
- function findHostInstance(fiber) {
13187
+ function findHostInstance(component) {
13188
+ var fiber = get(component);
13189
+ if (fiber === undefined) {
13190
+ if (typeof component.render === 'function') {
13191
+ invariant_1(false, 'Unable to find node on an unmounted component.');
13192
+ } else {
13193
+ invariant_1(false, 'Argument appears to not be a ReactComponent. Keys: %s', Object.keys(component));
13194
+ }
13195
+ }
13161
13196
  var hostFiber = findCurrentHostFiber(fiber);
13162
13197
  if (hostFiber === null) {
13163
13198
  return null;
@@ -13231,7 +13266,11 @@ var ReactFiberReconciler$1 = function (config) {
13231
13266
 
13232
13267
  return injectInternals(_assign({}, devToolsConfig, {
13233
13268
  findHostInstanceByFiber: function (fiber) {
13234
- return findHostInstance(fiber);
13269
+ var hostFiber = findCurrentHostFiber(fiber);
13270
+ if (hostFiber === null) {
13271
+ return null;
13272
+ }
13273
+ return hostFiber.stateNode;
13235
13274
  },
13236
13275
  findFiberByHostInstance: function (instance) {
13237
13276
  if (!findFiberByHostInstance) {
@@ -13276,7 +13315,7 @@ implementation) {
13276
13315
 
13277
13316
  // TODO: this is special because it gets imported during build.
13278
13317
 
13279
- var ReactVersion = '16.3.1';
13318
+ var ReactVersion = '16.3.2';
13280
13319
 
13281
13320
  // a requestAnimationFrame, storing the time for the start of the frame, then
13282
13321
  // scheduling a postMessage which gets scheduled after paint. Within the
@@ -14326,7 +14365,7 @@ function assertValidProps(tag, props, getStack) {
14326
14365
  !(typeof props.dangerouslySetInnerHTML === 'object' && HTML$1 in props.dangerouslySetInnerHTML) ? invariant_1(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : void 0;
14327
14366
  }
14328
14367
  {
14329
- warning_1(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.%s', getStack());
14368
+ !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) ? warning_1(false, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.%s', getStack()) : void 0;
14330
14369
  }
14331
14370
  !(props.style == null || typeof props.style === 'object') ? invariant_1(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getStack()) : void 0;
14332
14371
  }
@@ -15389,7 +15428,7 @@ function createElement$1(type, props, rootContainerElement, parentNamespace) {
15389
15428
  isCustomComponentTag = isCustomComponent(type, props);
15390
15429
  // Should this check be gated by parent namespace? Not sure we want to
15391
15430
  // allow <SVG> or <mATH>.
15392
- warning_1(isCustomComponentTag || type === type.toLowerCase(), '<%s /> is using uppercase HTML. Always use lowercase HTML tags ' + 'in React.', type);
15431
+ !(isCustomComponentTag || type === type.toLowerCase()) ? warning_1(false, '<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type) : void 0;
15393
15432
  }
15394
15433
 
15395
15434
  if (type === 'script') {
@@ -16342,7 +16381,7 @@ var validateDOMNesting = emptyFunction_1;
16342
16381
  var parentTag = parentInfo && parentInfo.tag;
16343
16382
 
16344
16383
  if (childText != null) {
16345
- warning_1(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null');
16384
+ !(childTag == null) ? warning_1(false, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
16346
16385
  childTag = '#text';
16347
16386
  }
16348
16387
 
@@ -16428,7 +16467,7 @@ var didWarnAboutUnstableCreatePortal = false;
16428
16467
  if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {
16429
16468
  var hostInstance = DOMRenderer.findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);
16430
16469
  if (hostInstance) {
16431
- warning_1(hostInstance.parentNode === container, 'render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');
16470
+ !(hostInstance.parentNode === container) ? warning_1(false, 'render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.') : void 0;
16432
16471
  }
16433
16472
  }
16434
16473
 
@@ -16436,13 +16475,13 @@ var didWarnAboutUnstableCreatePortal = false;
16436
16475
  var rootEl = getReactRootElementInContainer(container);
16437
16476
  var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl));
16438
16477
 
16439
- warning_1(!hasNonRootReactChild || isRootRenderedBySomeReact, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');
16478
+ !(!hasNonRootReactChild || isRootRenderedBySomeReact) ? warning_1(false, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : void 0;
16440
16479
 
16441
- warning_1(container.nodeType !== ELEMENT_NODE || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');
16480
+ !(container.nodeType !== ELEMENT_NODE || !container.tagName || container.tagName.toUpperCase() !== 'BODY') ? warning_1(false, 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : void 0;
16442
16481
  };
16443
16482
 
16444
16483
  warnOnInvalidCallback = function (callback, callerName) {
16445
- warning_1(callback === null || typeof callback === 'function', '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
16484
+ !(callback === null || typeof callback === 'function') ? warning_1(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback) : void 0;
16446
16485
  };
16447
16486
  }
16448
16487
 
@@ -17061,7 +17100,7 @@ var ReactDOM = {
17061
17100
  var owner = ReactCurrentOwner.current;
17062
17101
  if (owner !== null && owner.stateNode !== null) {
17063
17102
  var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;
17064
- warning_1(warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner) || 'A component');
17103
+ !warnedAboutRefsInRender ? warning_1(false, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner) || 'A component') : void 0;
17065
17104
  owner.stateNode._warnedAboutRefsInRender = true;
17066
17105
  }
17067
17106
  }
@@ -17072,16 +17111,7 @@ var ReactDOM = {
17072
17111
  return componentOrElement;
17073
17112
  }
17074
17113
 
17075
- var inst = get(componentOrElement);
17076
- if (inst) {
17077
- return DOMRenderer.findHostInstance(inst);
17078
- }
17079
-
17080
- if (typeof componentOrElement.render === 'function') {
17081
- invariant_1(false, 'Unable to find node on an unmounted component.');
17082
- } else {
17083
- invariant_1(false, 'Element appears to be neither ReactComponent nor DOMNode. Keys: %s', Object.keys(componentOrElement));
17084
- }
17114
+ return DOMRenderer.findHostInstance(componentOrElement);
17085
17115
  },
17086
17116
  hydrate: function (element, container, callback) {
17087
17117
  // TODO: throw or warn if we couldn't hydrate?
@@ -17101,7 +17131,7 @@ var ReactDOM = {
17101
17131
  {
17102
17132
  var rootEl = getReactRootElementInContainer(container);
17103
17133
  var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl);
17104
- warning_1(!renderedByDifferentReact, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
17134
+ !!renderedByDifferentReact ? warning_1(false, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.') : void 0;
17105
17135
  }
17106
17136
 
17107
17137
  // Unmount should not be batched.
@@ -17121,7 +17151,7 @@ var ReactDOM = {
17121
17151
  // Check if the container itself is a React root node.
17122
17152
  var isContainerReactRoot = container.nodeType === 1 && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
17123
17153
 
17124
- warning_1(!hasNonRootReactChild, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');
17154
+ !!hasNonRootReactChild ? warning_1(false, "unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : void 0;
17125
17155
  }
17126
17156
 
17127
17157
  return false;