react 0.14.0-beta3 → 0.14.0-rc1

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 (79) hide show
  1. package/addons.js +2 -0
  2. package/dist/react-dom.js +42 -0
  3. package/dist/react-dom.min.js +12 -0
  4. package/dist/react-with-addons.js +1587 -1228
  5. package/dist/react-with-addons.min.js +6 -6
  6. package/dist/react.js +1407 -1154
  7. package/dist/react.min.js +6 -6
  8. package/lib/CSSProperty.js +15 -3
  9. package/lib/CSSPropertyOperations.js +9 -1
  10. package/lib/ChangeEventPlugin.js +2 -1
  11. package/lib/DOMChildrenOperations.js +7 -1
  12. package/lib/DOMPropertyOperations.js +7 -1
  13. package/lib/Danger.js +9 -4
  14. package/lib/EnterLeaveEventPlugin.js +13 -5
  15. package/lib/EventConstants.js +1 -1
  16. package/lib/EventPluginHub.js +4 -7
  17. package/lib/EventPluginUtils.js +18 -27
  18. package/lib/EventPropagators.js +1 -1
  19. package/lib/FallbackCompositionState.js +6 -0
  20. package/lib/HTMLDOMPropertyConfig.js +7 -0
  21. package/lib/PooledClass.js +1 -3
  22. package/lib/React.js +14 -3
  23. package/lib/ReactBrowserComponentMixin.js +1 -1
  24. package/lib/ReactBrowserEventEmitter.js +3 -3
  25. package/lib/ReactCSSTransitionGroup.js +33 -18
  26. package/lib/ReactCSSTransitionGroupChild.js +42 -25
  27. package/lib/ReactChildReconciler.js +3 -5
  28. package/lib/ReactChildren.js +70 -30
  29. package/lib/ReactClass.js +7 -6
  30. package/lib/ReactComponent.js +5 -3
  31. package/lib/ReactCompositeComponent.js +44 -6
  32. package/lib/ReactDOM.js +7 -5
  33. package/lib/ReactDOMComponent.js +73 -26
  34. package/lib/ReactDOMFeatureFlags.js +18 -0
  35. package/lib/ReactDOMIDOperations.js +1 -59
  36. package/lib/ReactDOMInput.js +4 -0
  37. package/lib/ReactDOMSelect.js +1 -1
  38. package/lib/ReactDOMServer.js +3 -1
  39. package/lib/ReactDOMTextComponent.js +23 -10
  40. package/lib/ReactDefaultInjection.js +0 -2
  41. package/lib/ReactDefaultPerfAnalysis.js +0 -2
  42. package/lib/ReactElement.js +81 -35
  43. package/lib/ReactElementValidator.js +17 -68
  44. package/lib/ReactEmptyComponent.js +25 -61
  45. package/lib/ReactEmptyComponentRegistry.js +48 -0
  46. package/lib/ReactErrorUtils.js +44 -8
  47. package/lib/ReactEventListener.js +16 -9
  48. package/lib/ReactFragment.js +25 -116
  49. package/lib/ReactInjection.js +0 -2
  50. package/lib/ReactIsomorphic.js +4 -0
  51. package/lib/ReactMount.js +114 -40
  52. package/lib/ReactMultiChild.js +37 -4
  53. package/lib/ReactOwner.js +2 -2
  54. package/lib/ReactPropTypes.js +11 -8
  55. package/lib/ReactReconcileTransaction.js +4 -2
  56. package/lib/ReactReconciler.js +16 -17
  57. package/lib/ReactRef.js +14 -1
  58. package/lib/ReactServerRenderingTransaction.js +1 -0
  59. package/lib/ReactTestUtils.js +11 -8
  60. package/lib/ReactTransitionChildMapping.js +3 -6
  61. package/lib/ReactUpdateQueue.js +4 -4
  62. package/lib/ReactUpdates.js +1 -1
  63. package/lib/ReactVersion.js +14 -0
  64. package/lib/ReactWithAddons.js +10 -1
  65. package/lib/ResponderEventPlugin.js +1 -1
  66. package/lib/SelectEventPlugin.js +11 -1
  67. package/lib/SimpleEventPlugin.js +2 -23
  68. package/lib/SyntheticEvent.js +15 -0
  69. package/lib/Transaction.js +1 -1
  70. package/lib/deprecated.js +3 -2
  71. package/lib/findDOMNode.js +1 -1
  72. package/lib/instantiateReactComponent.js +3 -5
  73. package/lib/reactComponentExpect.js +6 -0
  74. package/lib/shouldUpdateReactComponent.js +12 -8
  75. package/lib/sliceChildren.js +3 -20
  76. package/lib/traverseAllChildren.js +10 -9
  77. package/package.json +2 -2
  78. package/react.js +1 -51
  79. package/dist/JSXTransformer.js +0 -17949
@@ -12,76 +12,40 @@
12
12
  'use strict';
13
13
 
14
14
  var ReactElement = require('./ReactElement');
15
- var ReactInstanceMap = require('./ReactInstanceMap');
15
+ var ReactEmptyComponentRegistry = require('./ReactEmptyComponentRegistry');
16
+ var ReactReconciler = require('./ReactReconciler');
16
17
 
17
- var invariant = require('fbjs/lib/invariant');
18
+ var assign = require('./Object.assign');
18
19
 
19
- var component;
20
- // This registry keeps track of the React IDs of the components that rendered to
21
- // `null` (in reality a placeholder such as `noscript`)
22
- var nullComponentIDsRegistry = {};
20
+ var placeholderElement;
23
21
 
24
22
  var ReactEmptyComponentInjection = {
25
- injectEmptyComponent: function (emptyComponent) {
26
- component = ReactElement.createFactory(emptyComponent);
23
+ injectEmptyComponent: function (component) {
24
+ placeholderElement = ReactElement.createElement(component);
27
25
  }
28
26
  };
29
27
 
30
- var ReactEmptyComponentType = function () {};
31
- ReactEmptyComponentType.prototype.componentDidMount = function () {
32
- var internalInstance = ReactInstanceMap.get(this);
33
- // TODO: Make sure we run these methods in the correct order, we shouldn't
34
- // need this check. We're going to assume if we're here it means we ran
35
- // componentWillUnmount already so there is no internal instance (it gets
36
- // removed as part of the unmounting process).
37
- if (!internalInstance) {
38
- return;
39
- }
40
- registerNullComponentID(internalInstance._rootNodeID);
28
+ var ReactEmptyComponent = function (instantiate) {
29
+ this._currentElement = null;
30
+ this._rootNodeID = null;
31
+ this._renderedComponent = instantiate(placeholderElement);
41
32
  };
42
- ReactEmptyComponentType.prototype.componentWillUnmount = function () {
43
- var internalInstance = ReactInstanceMap.get(this);
44
- // TODO: Get rid of this check. See TODO in componentDidMount.
45
- if (!internalInstance) {
46
- return;
33
+ assign(ReactEmptyComponent.prototype, {
34
+ construct: function (element) {},
35
+ mountComponent: function (rootID, transaction, context) {
36
+ ReactEmptyComponentRegistry.registerNullComponentID(rootID);
37
+ this._rootNodeID = rootID;
38
+ return ReactReconciler.mountComponent(this._renderedComponent, rootID, transaction, context);
39
+ },
40
+ receiveComponent: function () {},
41
+ unmountComponent: function (rootID, transaction, context) {
42
+ ReactReconciler.unmountComponent(this._renderedComponent);
43
+ ReactEmptyComponentRegistry.deregisterNullComponentID(this._rootNodeID);
44
+ this._rootNodeID = null;
45
+ this._renderedComponent = null;
47
46
  }
48
- deregisterNullComponentID(internalInstance._rootNodeID);
49
- };
50
- ReactEmptyComponentType.prototype.render = function () {
51
- !component ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to return null from a render, but no null placeholder component ' + 'was injected.') : invariant(false) : undefined;
52
- return component();
53
- };
54
-
55
- var emptyElement = ReactElement.createElement(ReactEmptyComponentType);
56
-
57
- /**
58
- * Mark the component as having rendered to null.
59
- * @param {string} id Component's `_rootNodeID`.
60
- */
61
- function registerNullComponentID(id) {
62
- nullComponentIDsRegistry[id] = true;
63
- }
47
+ });
64
48
 
65
- /**
66
- * Unmark the component as having rendered to null: it renders to something now.
67
- * @param {string} id Component's `_rootNodeID`.
68
- */
69
- function deregisterNullComponentID(id) {
70
- delete nullComponentIDsRegistry[id];
71
- }
72
-
73
- /**
74
- * @param {string} id Component's `_rootNodeID`.
75
- * @return {boolean} True if the component is rendered to null.
76
- */
77
- function isNullComponentID(id) {
78
- return !!nullComponentIDsRegistry[id];
79
- }
80
-
81
- var ReactEmptyComponent = {
82
- emptyElement: emptyElement,
83
- injection: ReactEmptyComponentInjection,
84
- isNullComponentID: isNullComponentID
85
- };
49
+ ReactEmptyComponent.injection = ReactEmptyComponentInjection;
86
50
 
87
51
  module.exports = ReactEmptyComponent;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Copyright 2014-2015, Facebook, Inc.
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the BSD-style license found in the
6
+ * LICENSE file in the root directory of this source tree. An additional grant
7
+ * of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ * @providesModule ReactEmptyComponentRegistry
10
+ */
11
+
12
+ 'use strict';
13
+
14
+ // This registry keeps track of the React IDs of the components that rendered to
15
+ // `null` (in reality a placeholder such as `noscript`)
16
+ var nullComponentIDsRegistry = {};
17
+
18
+ /**
19
+ * @param {string} id Component's `_rootNodeID`.
20
+ * @return {boolean} True if the component is rendered to null.
21
+ */
22
+ function isNullComponentID(id) {
23
+ return !!nullComponentIDsRegistry[id];
24
+ }
25
+
26
+ /**
27
+ * Mark the component as having rendered to null.
28
+ * @param {string} id Component's `_rootNodeID`.
29
+ */
30
+ function registerNullComponentID(id) {
31
+ nullComponentIDsRegistry[id] = true;
32
+ }
33
+
34
+ /**
35
+ * Unmark the component as having rendered to null: it renders to something now.
36
+ * @param {string} id Component's `_rootNodeID`.
37
+ */
38
+ function deregisterNullComponentID(id) {
39
+ delete nullComponentIDsRegistry[id];
40
+ }
41
+
42
+ var ReactEmptyComponentRegistry = {
43
+ isNullComponentID: isNullComponentID,
44
+ registerNullComponentID: registerNullComponentID,
45
+ deregisterNullComponentID: deregisterNullComponentID
46
+ };
47
+
48
+ module.exports = ReactEmptyComponentRegistry;
@@ -12,19 +12,55 @@
12
12
 
13
13
  'use strict';
14
14
 
15
+ var caughtError = null;
16
+
15
17
  var ReactErrorUtils = {
16
18
  /**
17
- * Creates a guarded version of a function. This is supposed to make debugging
18
- * of event handlers easier. To aid debugging with the browser's debugger,
19
- * this currently simply returns the original function.
19
+ * Call a function while guarding against errors that happens within it.
20
20
  *
21
- * @param {function} func Function to be executed
22
- * @param {string} name The name of the guard
23
- * @return {function}
21
+ * @param {?String} name of the guard to use for logging or debugging
22
+ * @param {Function} func The function to invoke
23
+ * @param {*} a First argument
24
+ * @param {*} b Second argument
25
+ */
26
+ invokeGuardedCallback: function (name, func, a, b) {
27
+ try {
28
+ return func(a, b);
29
+ } catch (x) {
30
+ if (caughtError === null) {
31
+ caughtError = x;
32
+ }
33
+ return undefined;
34
+ }
35
+ },
36
+
37
+ /**
38
+ * During execution of guarded functions we will capture the first error which
39
+ * we will rethrow to be handled by the top level error handler.
24
40
  */
25
- guard: function (func, name) {
26
- return func;
41
+ rethrowCaughtError: function () {
42
+ if (caughtError) {
43
+ var error = caughtError;
44
+ caughtError = null;
45
+ throw error;
46
+ }
27
47
  }
28
48
  };
29
49
 
50
+ if (process.env.NODE_ENV !== 'production') {
51
+ /**
52
+ * To help development we can get better devtools integration by simulating a
53
+ * real browser event.
54
+ */
55
+ if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof Event === 'function') {
56
+ var fakeNode = document.createElement('react');
57
+ ReactErrorUtils.invokeGuardedCallback = function (name, func, a, b) {
58
+ var boundFunc = func.bind(null, a, b);
59
+ fakeNode.addEventListener(name, boundFunc, false);
60
+ fakeNode.dispatchEvent(new Event(name));
61
+ fakeNode.removeEventListener(name, boundFunc, false);
62
+ };
63
+ }
64
+ }
65
+
30
66
  module.exports = ReactErrorUtils;
@@ -59,13 +59,18 @@ assign(TopLevelCallbackBookKeeping.prototype, {
59
59
  PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
60
60
 
61
61
  function handleTopLevelImpl(bookKeeping) {
62
- if (bookKeeping.nativeEvent.path && bookKeeping.nativeEvent.path.length > 1) {
63
- // New browsers have a path attribute on native events
64
- handleTopLevelWithPath(bookKeeping);
65
- } else {
66
- // Legacy browsers don't have a path attribute on native events
67
- handleTopLevelWithoutPath(bookKeeping);
68
- }
62
+ // TODO: Re-enable event.path handling
63
+ //
64
+ // if (bookKeeping.nativeEvent.path && bookKeeping.nativeEvent.path.length > 1) {
65
+ // // New browsers have a path attribute on native events
66
+ // handleTopLevelWithPath(bookKeeping);
67
+ // } else {
68
+ // // Legacy browsers don't have a path attribute on native events
69
+ // handleTopLevelWithoutPath(bookKeeping);
70
+ // }
71
+
72
+ void handleTopLevelWithPath; // temporarily unused
73
+ handleTopLevelWithoutPath(bookKeeping);
69
74
  }
70
75
 
71
76
  // Legacy browsers don't have a path attribute on native events
@@ -96,11 +101,13 @@ function handleTopLevelWithPath(bookKeeping) {
96
101
  var eventsFired = 0;
97
102
  for (var i = 0; i < path.length; i++) {
98
103
  var currentPathElement = path[i];
99
- var currentPathElementID = ReactMount.getID(currentPathElement);
100
104
  if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {
101
105
  currentNativeTarget = path[i + 1];
102
106
  }
103
- if (ReactMount.isRenderedByReact(currentPathElement)) {
107
+ // TODO: slow
108
+ var reactParent = ReactMount.getFirstReactDOM(currentPathElement);
109
+ if (reactParent === currentPathElement) {
110
+ var currentPathElementID = ReactMount.getID(currentPathElement);
104
111
  var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);
105
112
  bookKeeping.ancestors.push(currentPathElement);
106
113
 
@@ -11,8 +11,11 @@
11
11
 
12
12
  'use strict';
13
13
 
14
+ var ReactChildren = require('./ReactChildren');
14
15
  var ReactElement = require('./ReactElement');
15
16
 
17
+ var emptyFunction = require('fbjs/lib/emptyFunction');
18
+ var invariant = require('fbjs/lib/invariant');
16
19
  var warning = require('fbjs/lib/warning');
17
20
 
18
21
  /**
@@ -20,135 +23,41 @@ var warning = require('fbjs/lib/warning');
20
23
  * or nested sets. This allowed us a way to explicitly key a set a fragment of
21
24
  * components. This is now being replaced with an opaque data structure.
22
25
  * The upgrade path is to call React.addons.createFragment({ key: value }) to
23
- * create a keyed fragment. The resulting data structure is opaque, for now.
26
+ * create a keyed fragment. The resulting data structure is an array.
24
27
  */
25
28
 
26
- var fragmentKey;
27
- var didWarnKey;
28
- var canWarnForReactFragment;
29
+ var numericPropertyRegex = /^\d+$/;
29
30
 
30
- if (process.env.NODE_ENV !== 'production') {
31
- fragmentKey = '_reactFragment';
32
- didWarnKey = '_reactDidWarn';
33
-
34
- try {
35
- // Feature test. Don't even try to issue this warning if we can't use
36
- // enumerable: false.
37
-
38
- var dummy = function () {
39
- return 1;
40
- };
41
-
42
- Object.defineProperty({}, fragmentKey, { enumerable: false, value: true });
43
-
44
- Object.defineProperty({}, 'key', { enumerable: true, get: dummy });
45
-
46
- canWarnForReactFragment = true;
47
- } catch (x) {
48
- canWarnForReactFragment = false;
49
- }
50
-
51
- var proxyPropertyAccessWithWarning = function (obj, key) {
52
- Object.defineProperty(obj, key, {
53
- enumerable: true,
54
- get: function () {
55
- process.env.NODE_ENV !== 'production' ? warning(this[didWarnKey], 'A ReactFragment is an opaque type. Accessing any of its ' + 'properties is deprecated. Pass it to one of the React.Children ' + 'helpers.') : undefined;
56
- this[didWarnKey] = true;
57
- return this[fragmentKey][key];
58
- },
59
- set: function (value) {
60
- process.env.NODE_ENV !== 'production' ? warning(this[didWarnKey], 'A ReactFragment is an immutable opaque type. Mutating its ' + 'properties is deprecated.') : undefined;
61
- this[didWarnKey] = true;
62
- this[fragmentKey][key] = value;
63
- }
64
- });
65
- };
66
-
67
- var issuedWarnings = {};
68
-
69
- var didWarnForFragment = function (fragment) {
70
- // We use the keys and the type of the value as a heuristic to dedupe the
71
- // warning to avoid spamming too much.
72
- var fragmentCacheKey = '';
73
- for (var key in fragment) {
74
- fragmentCacheKey += key + ':' + typeof fragment[key] + ',';
75
- }
76
- var alreadyWarnedOnce = !!issuedWarnings[fragmentCacheKey];
77
- issuedWarnings[fragmentCacheKey] = true;
78
- return alreadyWarnedOnce;
79
- };
80
- }
31
+ var warnedAboutNumeric = false;
81
32
 
82
33
  var ReactFragment = {
83
34
  // Wrap a keyed object in an opaque proxy that warns you if you access any
84
35
  // of its properties.
85
36
  create: function (object) {
86
- if (process.env.NODE_ENV !== 'production') {
87
- if (typeof object !== 'object' || !object || Array.isArray(object)) {
88
- process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment only accepts a single object. Got: %s', object) : undefined;
89
- return object;
90
- }
91
- if (ReactElement.isValidElement(object)) {
92
- process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : undefined;
93
- return object;
94
- }
95
- if (canWarnForReactFragment) {
96
- var proxy = {};
97
- Object.defineProperty(proxy, fragmentKey, {
98
- enumerable: false,
99
- value: object
100
- });
101
- Object.defineProperty(proxy, didWarnKey, {
102
- writable: true,
103
- enumerable: false,
104
- value: false
105
- });
106
- for (var key in object) {
107
- proxyPropertyAccessWithWarning(proxy, key);
108
- }
109
- Object.preventExtensions(proxy);
110
- return proxy;
111
- }
37
+ if (typeof object !== 'object' || !object || Array.isArray(object)) {
38
+ process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment only accepts a single object. Got: %s', object) : undefined;
39
+ return object;
112
40
  }
113
- return object;
114
- },
115
- // Extract the original keyed object from the fragment opaque type. Warn if
116
- // a plain object is passed here.
117
- extract: function (fragment) {
118
- if (process.env.NODE_ENV !== 'production') {
119
- if (canWarnForReactFragment) {
120
- if (!fragment[fragmentKey]) {
121
- process.env.NODE_ENV !== 'production' ? warning(didWarnForFragment(fragment), 'Any use of a keyed object should be wrapped in ' + 'React.addons.createFragment(object) before being passed as a ' + 'child.') : undefined;
122
- return fragment;
123
- }
124
- return fragment[fragmentKey];
125
- }
41
+ if (ReactElement.isValidElement(object)) {
42
+ process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : undefined;
43
+ return object;
126
44
  }
127
- return fragment;
128
- },
129
- // Check if this is a fragment and if so, extract the keyed object. If it
130
- // is a fragment-like object, warn that it should be wrapped. Ignore if we
131
- // can't determine what kind of object this is.
132
- extractIfFragment: function (fragment) {
133
- if (process.env.NODE_ENV !== 'production') {
134
- if (canWarnForReactFragment) {
135
- // If it is the opaque type, return the keyed object.
136
- if (fragment[fragmentKey]) {
137
- return fragment[fragmentKey];
138
- }
139
- // Otherwise, check each property if it has an element, if it does
140
- // it is probably meant as a fragment, so we can warn early. Defer,
141
- // the warning to extract.
142
- for (var key in fragment) {
143
- if (fragment.hasOwnProperty(key) && ReactElement.isValidElement(fragment[key])) {
144
- // This looks like a fragment object, we should provide an
145
- // early warning.
146
- return ReactFragment.extract(fragment);
147
- }
45
+
46
+ !(object.nodeType !== 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.addons.createFragment(...): Encountered an invalid child; DOM ' + 'elements are not valid children of React components.') : invariant(false) : undefined;
47
+
48
+ var result = [];
49
+
50
+ for (var key in object) {
51
+ if (process.env.NODE_ENV !== 'production') {
52
+ if (!warnedAboutNumeric && numericPropertyRegex.test(key)) {
53
+ process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment(...): Child objects should have ' + 'non-numeric keys so ordering is preserved.') : undefined;
54
+ warnedAboutNumeric = true;
148
55
  }
149
56
  }
57
+ ReactChildren.mapIntoWithKeyPrefixInternal(object[key], result, key, emptyFunction.thatReturnsArgument);
150
58
  }
151
- return fragment;
59
+
60
+ return result;
152
61
  }
153
62
  };
154
63
 
@@ -18,7 +18,6 @@ var ReactClass = require('./ReactClass');
18
18
  var ReactEmptyComponent = require('./ReactEmptyComponent');
19
19
  var ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');
20
20
  var ReactNativeComponent = require('./ReactNativeComponent');
21
- var ReactDOMComponent = require('./ReactDOMComponent');
22
21
  var ReactPerf = require('./ReactPerf');
23
22
  var ReactRootIndex = require('./ReactRootIndex');
24
23
  var ReactUpdates = require('./ReactUpdates');
@@ -26,7 +25,6 @@ var ReactUpdates = require('./ReactUpdates');
26
25
  var ReactInjection = {
27
26
  Component: ReactComponentEnvironment.injection,
28
27
  Class: ReactClass.injection,
29
- DOMComponent: ReactDOMComponent.injection,
30
28
  DOMProperty: DOMProperty.injection,
31
29
  EmptyComponent: ReactEmptyComponent.injection,
32
30
  EventPluginHub: EventPluginHub.injection,
@@ -18,6 +18,7 @@ var ReactDOMFactories = require('./ReactDOMFactories');
18
18
  var ReactElement = require('./ReactElement');
19
19
  var ReactElementValidator = require('./ReactElementValidator');
20
20
  var ReactPropTypes = require('./ReactPropTypes');
21
+ var ReactVersion = require('./ReactVersion');
21
22
 
22
23
  var assign = require('./Object.assign');
23
24
  var onlyChild = require('./onlyChild');
@@ -40,6 +41,7 @@ var React = {
40
41
  map: ReactChildren.map,
41
42
  forEach: ReactChildren.forEach,
42
43
  count: ReactChildren.count,
44
+ toArray: ReactChildren.toArray,
43
45
  only: onlyChild
44
46
  },
45
47
 
@@ -63,6 +65,8 @@ var React = {
63
65
  // since they are just generating DOM strings.
64
66
  DOM: ReactDOMFactories,
65
67
 
68
+ version: ReactVersion,
69
+
66
70
  // Hook for JSX spread, don't use this for anything else.
67
71
  __spread: assign
68
72
  };