react-dom 16.10.0 → 16.12.0

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.
Files changed (42) hide show
  1. package/build-info.json +4 -4
  2. package/cjs/react-dom-server.browser.development.js +122 -177
  3. package/cjs/react-dom-server.browser.production.min.js +29 -29
  4. package/cjs/react-dom-server.node.development.js +116 -167
  5. package/cjs/react-dom-server.node.production.min.js +17 -17
  6. package/cjs/react-dom-test-utils.development.js +55 -91
  7. package/cjs/react-dom-test-utils.production.min.js +9 -9
  8. package/cjs/react-dom-unstable-fizz.browser.development.js +9 -5
  9. package/cjs/react-dom-unstable-fizz.browser.production.min.js +3 -3
  10. package/cjs/react-dom-unstable-fizz.node.development.js +23 -10
  11. package/cjs/react-dom-unstable-fizz.node.production.min.js +4 -3
  12. package/cjs/react-dom-unstable-flight-client.development.js +357 -0
  13. package/cjs/react-dom-unstable-flight-client.production.min.js +16 -0
  14. package/cjs/react-dom-unstable-flight-server.browser.development.js +392 -0
  15. package/cjs/react-dom-unstable-flight-server.browser.production.min.js +16 -0
  16. package/cjs/react-dom-unstable-flight-server.node.development.js +415 -0
  17. package/cjs/react-dom-unstable-flight-server.node.production.min.js +16 -0
  18. package/cjs/react-dom-unstable-native-dependencies.development.js +28 -48
  19. package/cjs/react-dom-unstable-native-dependencies.production.min.js +15 -15
  20. package/cjs/react-dom.development.js +1912 -2046
  21. package/cjs/react-dom.production.min.js +266 -269
  22. package/cjs/react-dom.profiling.min.js +252 -255
  23. package/package.json +8 -3
  24. package/umd/react-dom-server.browser.development.js +122 -177
  25. package/umd/react-dom-server.browser.production.min.js +36 -36
  26. package/umd/react-dom-test-utils.development.js +55 -91
  27. package/umd/react-dom-test-utils.production.min.js +9 -9
  28. package/umd/react-dom-unstable-fizz.browser.development.js +9 -5
  29. package/umd/react-dom-unstable-fizz.browser.production.min.js +3 -3
  30. package/umd/react-dom-unstable-flight-client.development.js +357 -0
  31. package/umd/react-dom-unstable-flight-client.production.min.js +14 -0
  32. package/umd/react-dom-unstable-flight-server.browser.development.js +390 -0
  33. package/umd/react-dom-unstable-flight-server.browser.production.min.js +14 -0
  34. package/umd/react-dom-unstable-native-dependencies.development.js +28 -48
  35. package/umd/react-dom-unstable-native-dependencies.production.min.js +22 -22
  36. package/umd/react-dom.development.js +1916 -2050
  37. package/umd/react-dom.production.min.js +230 -232
  38. package/umd/react-dom.profiling.min.js +237 -239
  39. package/unstable-flight-client.js +7 -0
  40. package/unstable-flight-server.browser.js +7 -0
  41. package/unstable-flight-server.js +3 -0
  42. package/unstable-flight-server.node.js +7 -0
package/build-info.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "branch": "master",
3
- "buildNumber": "48138",
4
- "checksum": "d91410d",
5
- "commit": "3694a3b5e",
3
+ "buildNumber": "59518",
4
+ "checksum": "6f449c4",
5
+ "commit": "b53ea6ca0",
6
6
  "environment": "ci",
7
- "reactVersion": "16.9.0-canary-3694a3b5e"
7
+ "reactVersion": "16.11.0-b53ea6ca0"
8
8
  }
@@ -1,4 +1,4 @@
1
- /** @license React v16.10.0
1
+ /** @license React v16.12.0
2
2
  * react-dom-server.browser.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -20,20 +20,12 @@ var React = require('react');
20
20
  var checkPropTypes = require('prop-types/checkPropTypes');
21
21
 
22
22
  // Do not require this module directly! Use normal `invariant` calls with
23
- // template literal strings. The messages will be converted to ReactError during
24
- // build, and in production they will be minified.
25
-
26
- // Do not require this module directly! Use normal `invariant` calls with
27
- // template literal strings. The messages will be converted to ReactError during
28
- // build, and in production they will be minified.
29
- function ReactError(error) {
30
- error.name = 'Invariant Violation';
31
- return error;
32
- }
23
+ // template literal strings. The messages will be replaced with error codes
24
+ // during build.
33
25
 
34
26
  // TODO: this is special because it gets imported during build.
35
27
 
36
- var ReactVersion = '16.10.0';
28
+ var ReactVersion = '16.12.0';
37
29
 
38
30
  /**
39
31
  * Use invariant() to assert state which your program assumes to be true.
@@ -364,12 +356,8 @@ var describeComponentFrame = function (name, source, ownerName) {
364
356
  return '\n in ' + (name || 'Unknown') + sourceInfo;
365
357
  };
366
358
 
367
- // Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
368
-
369
- // In some cases, StrictMode should also double-render lifecycles.
370
- // This can be confusing for tests though,
371
- // And it can be bad for performance in production.
372
- // This feature flag can be used to control the behavior:
359
+ // Helps identify side effects in render-phase lifecycle hooks and setState
360
+ // reducers by double invoking them in Strict Mode.
373
361
 
374
362
  // To preserve the "Pause on caught exceptions" behavior of the debugger, we
375
363
  // replay the begin phase of a failed component inside invokeGuardedCallback.
@@ -380,10 +368,9 @@ var warnAboutDeprecatedLifecycles = true; // Gather advanced timing metrics for
380
368
 
381
369
  // Trace which interactions trigger each commit.
382
370
 
383
- // Only used in www builds.
384
-
385
- var enableSuspenseServerRenderer = false; // TODO: true? Here it might just be false.
371
+ // SSR experiments
386
372
 
373
+ var enableSuspenseServerRenderer = false;
387
374
  // Only used in www builds.
388
375
 
389
376
  // Only used in www builds.
@@ -397,9 +384,6 @@ var disableJavaScriptURLs = false; // React Fire: prevent the value and checked
397
384
  // Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
398
385
 
399
386
 
400
- // See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information
401
- // This is a flag so we can fix warnings in RN core before turning it on
402
-
403
387
  // Experimental React Flare event system and event components support.
404
388
 
405
389
  var enableFlareAPI = false; // Experimental Host Component support.
@@ -409,15 +393,11 @@ var enableFundamentalAPI = false; // Experimental Scope support.
409
393
  var enableScopeAPI = false; // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107
410
394
 
411
395
  // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)
412
- // Till then, we warn about the missing mock, but still fallback to a sync mode compatible version
396
+ // Till then, we warn about the missing mock, but still fallback to a legacy mode compatible version
413
397
 
414
398
  // For tests, we flush suspense fallbacks in an act scope;
415
399
  // *except* in some of our own tests, where we test incremental loading states.
416
400
 
417
- // Changes priority of some events like mousemove to user-blocking priority,
418
- // but without making them discrete. The flag exists in case it causes
419
- // starvation problems.
420
-
421
401
  // Add a callback property to suspense to notify which promises are currently
422
402
  // in the update queue. This allows reporting and tracing of what is causing
423
403
  // the user to see a loading state.
@@ -432,6 +412,8 @@ var enableScopeAPI = false; // New API for JSX transforms to target - https://gi
432
412
 
433
413
  var disableLegacyContext = false;
434
414
 
415
+ // Flag to turn event.target and event.currentTarget in ReactNative from a reactTag to a component instance
416
+
435
417
  var ReactDebugCurrentFrame$1;
436
418
  var didWarnAboutInvalidateContextType;
437
419
 
@@ -575,13 +557,11 @@ function growThreadCountAndReturnNextAvailable() {
575
557
  var oldSize = oldArray.length;
576
558
  var newSize = oldSize * 2;
577
559
 
578
- (function () {
579
- if (!(newSize <= 0x10000)) {
580
- {
581
- throw ReactError(Error("Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic."));
582
- }
560
+ if (!(newSize <= 0x10000)) {
561
+ {
562
+ throw Error("Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic.");
583
563
  }
584
- })();
564
+ }
585
565
 
586
566
  var newArray = new Uint16Array(newSize);
587
567
  newArray.set(oldArray);
@@ -917,13 +897,11 @@ var didWarn = false;
917
897
 
918
898
  function sanitizeURL(url) {
919
899
  if (disableJavaScriptURLs) {
920
- (function () {
921
- if (!!isJavaScriptProtocol.test(url)) {
922
- {
923
- throw ReactError(Error("React has blocked a javascript: URL as a security precaution." + (ReactDebugCurrentFrame$2.getStackAddendum())));
924
- }
900
+ if (!!isJavaScriptProtocol.test(url)) {
901
+ {
902
+ throw Error("React has blocked a javascript: URL as a security precaution." + (ReactDebugCurrentFrame$2.getStackAddendum()));
925
903
  }
926
- })();
904
+ }
927
905
  } else if (true && !didWarn && isJavaScriptProtocol.test(url)) {
928
906
  didWarn = true;
929
907
  warning$1(false, 'A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
@@ -1129,13 +1107,11 @@ var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently
1129
1107
  var currentHookNameInDev;
1130
1108
 
1131
1109
  function resolveCurrentlyRenderingComponent() {
1132
- (function () {
1133
- if (!(currentlyRenderingComponent !== null)) {
1134
- {
1135
- throw ReactError(Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem."));
1136
- }
1110
+ if (!(currentlyRenderingComponent !== null)) {
1111
+ {
1112
+ throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.");
1137
1113
  }
1138
- })();
1114
+ }
1139
1115
 
1140
1116
  {
1141
1117
  !!isInHookUserCodeInDev ? warning$1(false, 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks') : void 0;
@@ -1174,13 +1150,11 @@ function areHookInputsEqual(nextDeps, prevDeps) {
1174
1150
 
1175
1151
  function createHook() {
1176
1152
  if (numberOfReRenders > 0) {
1177
- (function () {
1153
+ {
1178
1154
  {
1179
- {
1180
- throw ReactError(Error("Rendered more hooks than during the previous render"));
1181
- }
1155
+ throw Error("Rendered more hooks than during the previous render");
1182
1156
  }
1183
- })();
1157
+ }
1184
1158
  }
1185
1159
 
1186
1160
  return {
@@ -1442,13 +1416,11 @@ function useLayoutEffect(create, inputs) {
1442
1416
  }
1443
1417
 
1444
1418
  function dispatchAction(componentIdentity, queue, action) {
1445
- (function () {
1446
- if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
1447
- {
1448
- throw ReactError(Error("Too many re-renders. React limits the number of renders to prevent an infinite loop."));
1449
- }
1419
+ if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
1420
+ {
1421
+ throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
1450
1422
  }
1451
- })();
1423
+ }
1452
1424
 
1453
1425
  if (componentIdentity === currentlyRenderingComponent) {
1454
1426
  // This is a render phase update. Stash it in a lazily-created map of
@@ -1496,6 +1468,21 @@ function useResponder(responder, props) {
1496
1468
  };
1497
1469
  }
1498
1470
 
1471
+ function useDeferredValue(value, config) {
1472
+ resolveCurrentlyRenderingComponent();
1473
+ return value;
1474
+ }
1475
+
1476
+ function useTransition(config) {
1477
+ resolveCurrentlyRenderingComponent();
1478
+
1479
+ var startTransition = function (callback) {
1480
+ callback();
1481
+ };
1482
+
1483
+ return [startTransition, false];
1484
+ }
1485
+
1499
1486
  function noop() {}
1500
1487
 
1501
1488
  var currentThreadID = 0;
@@ -1517,7 +1504,9 @@ var Dispatcher = {
1517
1504
  useEffect: noop,
1518
1505
  // Debugging effect
1519
1506
  useDebugValue: noop,
1520
- useResponder: useResponder
1507
+ useResponder: useResponder,
1508
+ useDeferredValue: useDeferredValue,
1509
+ useTransition: useTransition
1521
1510
  };
1522
1511
 
1523
1512
  var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
@@ -1641,44 +1630,36 @@ function assertValidProps(tag, props) {
1641
1630
 
1642
1631
 
1643
1632
  if (voidElementTags[tag]) {
1644
- (function () {
1645
- if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
1646
- {
1647
- throw ReactError(Error(tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + (ReactDebugCurrentFrame$4.getStackAddendum())));
1648
- }
1633
+ if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
1634
+ {
1635
+ throw Error(tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + (ReactDebugCurrentFrame$4.getStackAddendum()));
1649
1636
  }
1650
- })();
1637
+ }
1651
1638
  }
1652
1639
 
1653
1640
  if (props.dangerouslySetInnerHTML != null) {
1654
- (function () {
1655
- if (!(props.children == null)) {
1656
- {
1657
- throw ReactError(Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`."));
1658
- }
1641
+ if (!(props.children == null)) {
1642
+ {
1643
+ throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
1659
1644
  }
1660
- })();
1645
+ }
1661
1646
 
1662
- (function () {
1663
- if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
1664
- {
1665
- throw ReactError(Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information."));
1666
- }
1647
+ if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
1648
+ {
1649
+ throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.");
1667
1650
  }
1668
- })();
1651
+ }
1669
1652
  }
1670
1653
 
1671
1654
  {
1672
1655
  !(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.') : void 0;
1673
1656
  }
1674
1657
 
1675
- (function () {
1676
- if (!(props.style == null || typeof props.style === 'object')) {
1677
- {
1678
- throw ReactError(Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + (ReactDebugCurrentFrame$4.getStackAddendum())));
1679
- }
1658
+ if (!(props.style == null || typeof props.style === 'object')) {
1659
+ {
1660
+ throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + (ReactDebugCurrentFrame$4.getStackAddendum()));
1680
1661
  }
1681
- })();
1662
+ }
1682
1663
  }
1683
1664
 
1684
1665
  /**
@@ -2923,13 +2904,11 @@ var validatedTagCache = {};
2923
2904
 
2924
2905
  function validateDangerousTag(tag) {
2925
2906
  if (!validatedTagCache.hasOwnProperty(tag)) {
2926
- (function () {
2927
- if (!VALID_TAG_REGEX.test(tag)) {
2928
- {
2929
- throw ReactError(Error("Invalid tag: " + tag));
2930
- }
2907
+ if (!VALID_TAG_REGEX.test(tag)) {
2908
+ {
2909
+ throw Error("Invalid tag: " + tag);
2931
2910
  }
2932
- })();
2911
+ }
2933
2912
 
2934
2913
  validatedTagCache[tag] = true;
2935
2914
  }
@@ -3119,13 +3098,11 @@ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeSt
3119
3098
 
3120
3099
  function validateRenderResult(child, type) {
3121
3100
  if (child === undefined) {
3122
- (function () {
3101
+ {
3123
3102
  {
3124
- {
3125
- throw ReactError(Error((getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null."));
3126
- }
3103
+ throw Error((getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.");
3127
3104
  }
3128
- })();
3105
+ }
3129
3106
  }
3130
3107
  }
3131
3108
 
@@ -3341,13 +3318,11 @@ function resolve(child, context, threadID) {
3341
3318
  childContext = inst.getChildContext();
3342
3319
 
3343
3320
  for (var contextKey in childContext) {
3344
- (function () {
3345
- if (!(contextKey in _childContextTypes)) {
3346
- {
3347
- throw ReactError(Error((getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes."));
3348
- }
3321
+ if (!(contextKey in _childContextTypes)) {
3322
+ {
3323
+ throw Error((getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes.");
3349
3324
  }
3350
- })();
3325
+ }
3351
3326
  }
3352
3327
  } else {
3353
3328
  warningWithoutStack$1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
@@ -3480,8 +3455,6 @@ function () {
3480
3455
  };
3481
3456
 
3482
3457
  _proto.read = function read(bytes) {
3483
- var _this = this;
3484
-
3485
3458
  if (this.exhausted) {
3486
3459
  return null;
3487
3460
  }
@@ -3529,13 +3502,11 @@ function () {
3529
3502
 
3530
3503
  var fallbackFrame = frame.fallbackFrame;
3531
3504
 
3532
- (function () {
3533
- if (!fallbackFrame) {
3534
- {
3535
- throw ReactError(Error("ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue."));
3536
- }
3505
+ if (!fallbackFrame) {
3506
+ {
3507
+ throw Error("ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue.");
3537
3508
  }
3538
- })();
3509
+ }
3539
3510
 
3540
3511
  this.stack.push(fallbackFrame);
3541
3512
  out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback
@@ -3565,23 +3536,19 @@ function () {
3565
3536
  } catch (err) {
3566
3537
  if (err != null && typeof err.then === 'function') {
3567
3538
  if (enableSuspenseServerRenderer) {
3568
- (function () {
3569
- if (!(_this.suspenseDepth > 0)) {
3570
- {
3571
- throw ReactError(Error("A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."));
3572
- }
3539
+ if (!(this.suspenseDepth > 0)) {
3540
+ {
3541
+ throw Error("A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.");
3573
3542
  }
3574
- })();
3543
+ }
3575
3544
 
3576
3545
  suspended = true;
3577
3546
  } else {
3578
- (function () {
3547
+ {
3579
3548
  {
3580
- {
3581
- throw ReactError(Error("ReactDOMServer does not yet support Suspense."));
3582
- }
3549
+ throw Error("ReactDOMServer does not yet support Suspense.");
3583
3550
  }
3584
- })();
3551
+ }
3585
3552
  }
3586
3553
  } else {
3587
3554
  throw err;
@@ -3639,22 +3606,18 @@ function () {
3639
3606
  // Catch unexpected special types early.
3640
3607
  var $$typeof = nextChild.$$typeof;
3641
3608
 
3642
- (function () {
3643
- if (!($$typeof !== REACT_PORTAL_TYPE)) {
3644
- {
3645
- throw ReactError(Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render."));
3646
- }
3609
+ if (!($$typeof !== REACT_PORTAL_TYPE)) {
3610
+ {
3611
+ throw Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");
3647
3612
  }
3648
- })(); // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
3613
+ } // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
3649
3614
 
3650
3615
 
3651
- (function () {
3616
+ {
3652
3617
  {
3653
- {
3654
- throw ReactError(Error("Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue."));
3655
- }
3618
+ throw Error("Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue.");
3656
3619
  }
3657
- })();
3620
+ }
3658
3621
  }
3659
3622
 
3660
3623
  var nextChildren = toArray(nextChild);
@@ -3766,13 +3729,11 @@ function () {
3766
3729
  this.suspenseDepth++;
3767
3730
  return '<!--$-->';
3768
3731
  } else {
3769
- (function () {
3732
+ {
3770
3733
  {
3771
- {
3772
- throw ReactError(Error("ReactDOMServer does not yet support Suspense."));
3773
- }
3734
+ throw Error("ReactDOMServer does not yet support Suspense.");
3774
3735
  }
3775
- })();
3736
+ }
3776
3737
  }
3777
3738
  }
3778
3739
  // eslint-disable-next-line-no-fallthrough
@@ -3937,13 +3898,11 @@ function () {
3937
3898
  return open;
3938
3899
  }
3939
3900
 
3940
- (function () {
3901
+ {
3941
3902
  {
3942
- {
3943
- throw ReactError(Error("ReactDOMServer does not yet support the fundamental API."));
3944
- }
3903
+ throw Error("ReactDOMServer does not yet support the fundamental API.");
3945
3904
  }
3946
- })();
3905
+ }
3947
3906
  }
3948
3907
  // eslint-disable-next-line-no-fallthrough
3949
3908
 
@@ -3984,13 +3943,11 @@ function () {
3984
3943
 
3985
3944
  case Pending:
3986
3945
  default:
3987
- (function () {
3946
+ {
3988
3947
  {
3989
- {
3990
- throw ReactError(Error("ReactDOMServer does not yet support lazy-loaded components."));
3991
- }
3948
+ throw Error("ReactDOMServer does not yet support lazy-loaded components.");
3992
3949
  }
3993
- })();
3950
+ }
3994
3951
 
3995
3952
  }
3996
3953
  }
@@ -4018,13 +3975,11 @@ function () {
4018
3975
  return '';
4019
3976
  }
4020
3977
 
4021
- (function () {
3978
+ {
4022
3979
  {
4023
- {
4024
- throw ReactError(Error("ReactDOMServer does not yet support scope components."));
4025
- }
3980
+ throw Error("ReactDOMServer does not yet support scope components.");
4026
3981
  }
4027
- })();
3982
+ }
4028
3983
  }
4029
3984
  }
4030
3985
  }
@@ -4045,13 +4000,11 @@ function () {
4045
4000
  }
4046
4001
  }
4047
4002
 
4048
- (function () {
4003
+ {
4049
4004
  {
4050
- {
4051
- throw ReactError(Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (elementType == null ? elementType : typeof elementType) + "." + info));
4052
- }
4005
+ throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (elementType == null ? elementType : typeof elementType) + "." + info);
4053
4006
  }
4054
- })();
4007
+ }
4055
4008
  }
4056
4009
  };
4057
4010
 
@@ -4119,22 +4072,18 @@ function () {
4119
4072
  warning$1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
4120
4073
  }
4121
4074
 
4122
- (function () {
4123
- if (!(defaultValue == null)) {
4124
- {
4125
- throw ReactError(Error("If you supply `defaultValue` on a <textarea>, do not pass children."));
4126
- }
4075
+ if (!(defaultValue == null)) {
4076
+ {
4077
+ throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");
4127
4078
  }
4128
- })();
4079
+ }
4129
4080
 
4130
4081
  if (Array.isArray(textareaChildren)) {
4131
- (function () {
4132
- if (!(textareaChildren.length <= 1)) {
4133
- {
4134
- throw ReactError(Error("<textarea> can only have at most one child."));
4135
- }
4082
+ if (!(textareaChildren.length <= 1)) {
4083
+ {
4084
+ throw Error("<textarea> can only have at most one child.");
4136
4085
  }
4137
- })();
4086
+ }
4138
4087
 
4139
4088
  textareaChildren = textareaChildren[0];
4140
4089
  }
@@ -4316,23 +4265,19 @@ function renderToStaticMarkup(element) {
4316
4265
  }
4317
4266
 
4318
4267
  function renderToNodeStream() {
4319
- (function () {
4268
+ {
4320
4269
  {
4321
- {
4322
- throw ReactError(Error("ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead."));
4323
- }
4270
+ throw Error("ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.");
4324
4271
  }
4325
- })();
4272
+ }
4326
4273
  }
4327
4274
 
4328
4275
  function renderToStaticNodeStream() {
4329
- (function () {
4276
+ {
4330
4277
  {
4331
- {
4332
- throw ReactError(Error("ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead."));
4333
- }
4278
+ throw Error("ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.");
4334
4279
  }
4335
- })();
4280
+ }
4336
4281
  } // Note: when changing this, also consider https://github.com/facebook/react/issues/11526
4337
4282
 
4338
4283