react 15.7.0 → 16.0.0-alpha
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.
- package/LICENSE +26 -16
- package/PATENTS +33 -0
- package/README.md +7 -0
- package/dist/react-with-addons.js +3831 -4404
- package/dist/react-with-addons.min.js +7 -6
- package/dist/react.js +2929 -3319
- package/dist/react.min.js +7 -5
- package/lib/KeyEscapeUtils.js +5 -3
- package/lib/PooledClass.js +5 -3
- package/lib/React.js +20 -61
- package/lib/ReactAddonsDOMDependencies.js +5 -3
- package/lib/ReactAddonsDOMDependenciesUMDShim.js +5 -3
- package/lib/ReactCSSTransitionGroup.js +9 -9
- package/lib/ReactCSSTransitionGroupChild.js +118 -134
- package/lib/ReactChildren.js +9 -7
- package/lib/ReactClass.js +703 -0
- package/lib/{ReactBaseClasses.js → ReactComponent.js} +11 -40
- package/lib/ReactComponentTreeHook.js +63 -58
- package/lib/ReactComponentTreeHookUMDShim.js +5 -3
- package/lib/ReactComponentWithPureRenderMixin.js +5 -3
- package/lib/ReactCurrentOwner.js +7 -3
- package/lib/ReactCurrentOwnerUMDShim.js +5 -3
- package/lib/ReactDOMFactories.js +6 -3
- package/lib/ReactElement.js +9 -7
- package/lib/ReactElementSymbol.js +5 -3
- package/lib/ReactElementType.js +5 -3
- package/lib/ReactElementValidator.js +13 -12
- package/lib/ReactFragment.js +5 -3
- package/lib/ReactNoopUpdateQueue.js +15 -16
- package/lib/ReactPropTypeLocationNames.js +5 -3
- package/lib/ReactPropTypeLocations.js +5 -3
- package/lib/ReactPropTypes.js +447 -7
- package/lib/ReactPureComponent.js +41 -0
- package/lib/ReactStateSetters.js +5 -3
- package/lib/ReactTransitionChildMapping.js +5 -3
- package/lib/ReactTransitionEvents.js +5 -3
- package/lib/ReactTransitionGroup.js +8 -12
- package/lib/ReactTypeOfWork.js +26 -0
- package/lib/ReactUMDEntry.js +8 -7
- package/lib/ReactUMDShim.js +5 -3
- package/lib/ReactVersion.js +6 -4
- package/lib/ReactWithAddons.js +5 -5
- package/lib/ReactWithAddonsUMDEntry.js +8 -7
- package/lib/canDefineProperty.js +5 -3
- package/lib/checkReactTypeSpec.js +22 -9
- package/lib/deprecated.js +8 -6
- package/lib/flattenChildren.js +5 -3
- package/lib/getComponentName.js +37 -0
- package/lib/getIteratorFn.js +5 -3
- package/lib/getNextDebugID.js +5 -3
- package/lib/onlyChild.js +6 -4
- package/lib/reactProdInvariant.js +4 -2
- package/lib/shallowCompare.js +5 -3
- package/lib/sliceChildren.js +5 -3
- package/lib/traverseAllChildren.js +6 -4
- package/lib/update.js +5 -3
- package/package.json +24 -35
- package/cjs/react-jsx-dev-runtime.development.js +0 -866
- package/cjs/react-jsx-dev-runtime.production.min.js +0 -9
- package/cjs/react-jsx-runtime.development.js +0 -888
- package/cjs/react-jsx-runtime.production.min.js +0 -10
- package/jsx-dev-runtime.js +0 -7
- package/jsx-runtime.js +0 -7
- package/lib/LinkedStateMixin.js +0 -32
- package/lib/ReactComponentTreeDevtool.js +0 -12
- package/lib/ReactLink.js +0 -47
- package/lib/ReactPropTypesSecret.js +0 -14
- package/lib/createClass.js +0 -20
- package/lib/getNextDebugIDUMDShim.js +0 -15
- package/lib/lowPriorityWarning.js +0 -62
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
* This source code is licensed under the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
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.
|
|
6
8
|
*
|
|
7
9
|
*/
|
|
8
10
|
|
|
9
11
|
'use strict';
|
|
10
12
|
|
|
11
|
-
var _prodInvariant = require('./reactProdInvariant')
|
|
12
|
-
_assign = require('object-assign');
|
|
13
|
+
var _prodInvariant = require('./reactProdInvariant');
|
|
13
14
|
|
|
14
15
|
var ReactNoopUpdateQueue = require('./ReactNoopUpdateQueue');
|
|
15
16
|
|
|
16
17
|
var canDefineProperty = require('./canDefineProperty');
|
|
17
18
|
var emptyObject = require('fbjs/lib/emptyObject');
|
|
18
19
|
var invariant = require('fbjs/lib/invariant');
|
|
19
|
-
var
|
|
20
|
+
var warning = require('fbjs/lib/warning');
|
|
20
21
|
|
|
21
22
|
/**
|
|
22
23
|
* Base class helpers for the updating state of a component.
|
|
@@ -59,10 +60,7 @@ ReactComponent.prototype.isReactComponent = {};
|
|
|
59
60
|
*/
|
|
60
61
|
ReactComponent.prototype.setState = function (partialState, callback) {
|
|
61
62
|
!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;
|
|
62
|
-
this.updater.enqueueSetState(this, partialState);
|
|
63
|
-
if (callback) {
|
|
64
|
-
this.updater.enqueueCallback(this, callback, 'setState');
|
|
65
|
-
}
|
|
63
|
+
this.updater.enqueueSetState(this, partialState, callback, 'setState');
|
|
66
64
|
};
|
|
67
65
|
|
|
68
66
|
/**
|
|
@@ -80,10 +78,7 @@ ReactComponent.prototype.setState = function (partialState, callback) {
|
|
|
80
78
|
* @protected
|
|
81
79
|
*/
|
|
82
80
|
ReactComponent.prototype.forceUpdate = function (callback) {
|
|
83
|
-
this.updater.enqueueForceUpdate(this);
|
|
84
|
-
if (callback) {
|
|
85
|
-
this.updater.enqueueCallback(this, callback, 'forceUpdate');
|
|
86
|
-
}
|
|
81
|
+
this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
|
|
87
82
|
};
|
|
88
83
|
|
|
89
84
|
/**
|
|
@@ -100,7 +95,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
100
95
|
if (canDefineProperty) {
|
|
101
96
|
Object.defineProperty(ReactComponent.prototype, methodName, {
|
|
102
97
|
get: function () {
|
|
103
|
-
|
|
98
|
+
process.env.NODE_ENV !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0;
|
|
104
99
|
return undefined;
|
|
105
100
|
}
|
|
106
101
|
});
|
|
@@ -113,28 +108,4 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
113
108
|
}
|
|
114
109
|
}
|
|
115
110
|
|
|
116
|
-
|
|
117
|
-
* Base class helpers for the updating state of a component.
|
|
118
|
-
*/
|
|
119
|
-
function ReactPureComponent(props, context, updater) {
|
|
120
|
-
// Duplicated from ReactComponent.
|
|
121
|
-
this.props = props;
|
|
122
|
-
this.context = context;
|
|
123
|
-
this.refs = emptyObject;
|
|
124
|
-
// We initialize the default updater but the real one gets injected by the
|
|
125
|
-
// renderer.
|
|
126
|
-
this.updater = updater || ReactNoopUpdateQueue;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function ComponentDummy() {}
|
|
130
|
-
ComponentDummy.prototype = ReactComponent.prototype;
|
|
131
|
-
ReactPureComponent.prototype = new ComponentDummy();
|
|
132
|
-
ReactPureComponent.prototype.constructor = ReactPureComponent;
|
|
133
|
-
// Avoid an extra prototype jump for these methods.
|
|
134
|
-
_assign(ReactPureComponent.prototype, ReactComponent.prototype);
|
|
135
|
-
ReactPureComponent.prototype.isPureReactComponent = true;
|
|
136
|
-
|
|
137
|
-
module.exports = {
|
|
138
|
-
Component: ReactComponent,
|
|
139
|
-
PureComponent: ReactPureComponent
|
|
140
|
-
};
|
|
111
|
+
module.exports = ReactComponent;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2016-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
* This source code is licensed under the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
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.
|
|
6
8
|
*
|
|
7
9
|
*
|
|
8
10
|
*/
|
|
@@ -12,7 +14,14 @@
|
|
|
12
14
|
var _prodInvariant = require('./reactProdInvariant');
|
|
13
15
|
|
|
14
16
|
var ReactCurrentOwner = require('./ReactCurrentOwner');
|
|
17
|
+
var ReactTypeOfWork = require('./ReactTypeOfWork');
|
|
18
|
+
var IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent,
|
|
19
|
+
FunctionalComponent = ReactTypeOfWork.FunctionalComponent,
|
|
20
|
+
ClassComponent = ReactTypeOfWork.ClassComponent,
|
|
21
|
+
HostComponent = ReactTypeOfWork.HostComponent;
|
|
15
22
|
|
|
23
|
+
|
|
24
|
+
var getComponentName = require('./getComponentName');
|
|
16
25
|
var invariant = require('fbjs/lib/invariant');
|
|
17
26
|
var warning = require('fbjs/lib/warning');
|
|
18
27
|
|
|
@@ -22,11 +31,11 @@ function isNative(fn) {
|
|
|
22
31
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
23
32
|
var reIsNative = RegExp('^' + funcToString
|
|
24
33
|
// Take an example native function source for comparison
|
|
25
|
-
.call(hasOwnProperty
|
|
34
|
+
.call(hasOwnProperty)
|
|
26
35
|
// Strip regex characters so we can use it for regex
|
|
27
|
-
|
|
36
|
+
.replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
|
|
28
37
|
// Remove hasOwnProperty from the template to make it generic
|
|
29
|
-
|
|
38
|
+
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
|
30
39
|
try {
|
|
31
40
|
var source = funcToString.call(fn);
|
|
32
41
|
return reIsNative.test(source);
|
|
@@ -163,10 +172,29 @@ function describeID(id) {
|
|
|
163
172
|
return describeComponentFrame(name, element && element._source, ownerName);
|
|
164
173
|
}
|
|
165
174
|
|
|
175
|
+
function describeFiber(fiber) {
|
|
176
|
+
switch (fiber.tag) {
|
|
177
|
+
case IndeterminateComponent:
|
|
178
|
+
case FunctionalComponent:
|
|
179
|
+
case ClassComponent:
|
|
180
|
+
case HostComponent:
|
|
181
|
+
var owner = fiber._debugOwner;
|
|
182
|
+
var source = fiber._debugSource;
|
|
183
|
+
var name = getComponentName(fiber);
|
|
184
|
+
var ownerName = null;
|
|
185
|
+
if (owner) {
|
|
186
|
+
ownerName = getComponentName(owner);
|
|
187
|
+
}
|
|
188
|
+
return describeComponentFrame(name, source, ownerName);
|
|
189
|
+
default:
|
|
190
|
+
return '';
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
166
194
|
var ReactComponentTreeHook = {
|
|
167
195
|
onSetChildren: function (id, nextChildIDs) {
|
|
168
196
|
var item = getItem(id);
|
|
169
|
-
|
|
197
|
+
invariant(item, 'Item must have been set');
|
|
170
198
|
item.childIDs = nextChildIDs;
|
|
171
199
|
|
|
172
200
|
for (var i = 0; i < nextChildIDs.length; i++) {
|
|
@@ -206,7 +234,7 @@ var ReactComponentTreeHook = {
|
|
|
206
234
|
},
|
|
207
235
|
onMountComponent: function (id) {
|
|
208
236
|
var item = getItem(id);
|
|
209
|
-
|
|
237
|
+
invariant(item, 'Item must have been set');
|
|
210
238
|
item.isMounted = true;
|
|
211
239
|
var isRoot = item.parentID === 0;
|
|
212
240
|
if (isRoot) {
|
|
@@ -259,13 +287,20 @@ var ReactComponentTreeHook = {
|
|
|
259
287
|
if (topElement) {
|
|
260
288
|
var name = getDisplayName(topElement);
|
|
261
289
|
var owner = topElement._owner;
|
|
262
|
-
info += describeComponentFrame(name, topElement._source, owner && owner
|
|
290
|
+
info += describeComponentFrame(name, topElement._source, owner && getComponentName(owner));
|
|
263
291
|
}
|
|
264
292
|
|
|
265
293
|
var currentOwner = ReactCurrentOwner.current;
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
294
|
+
if (currentOwner) {
|
|
295
|
+
if (typeof currentOwner.tag === 'number') {
|
|
296
|
+
var workInProgress = currentOwner;
|
|
297
|
+
// Safe because if current owner exists, we are reconciling,
|
|
298
|
+
// and it is guaranteed to be the work-in-progress version.
|
|
299
|
+
info += ReactComponentTreeHook.getStackAddendumByWorkInProgressFiber(workInProgress);
|
|
300
|
+
} else if (typeof currentOwner._debugID === 'number') {
|
|
301
|
+
info += ReactComponentTreeHook.getStackAddendumByID(currentOwner._debugID);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
269
304
|
return info;
|
|
270
305
|
},
|
|
271
306
|
getStackAddendumByID: function (id) {
|
|
@@ -276,6 +311,21 @@ var ReactComponentTreeHook = {
|
|
|
276
311
|
}
|
|
277
312
|
return info;
|
|
278
313
|
},
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
// This function can only be called with a work-in-progress fiber and
|
|
317
|
+
// only during begin or complete phase. Do not call it under any other
|
|
318
|
+
// circumstances.
|
|
319
|
+
getStackAddendumByWorkInProgressFiber: function (workInProgress) {
|
|
320
|
+
var info = '';
|
|
321
|
+
var node = workInProgress;
|
|
322
|
+
do {
|
|
323
|
+
info += describeFiber(node);
|
|
324
|
+
// Otherwise this return pointer might point to the wrong tree:
|
|
325
|
+
node = node['return'];
|
|
326
|
+
} while (node);
|
|
327
|
+
return info;
|
|
328
|
+
},
|
|
279
329
|
getChildIDs: function (id) {
|
|
280
330
|
var item = getItem(id);
|
|
281
331
|
return item ? item.childIDs : [];
|
|
@@ -325,52 +375,7 @@ var ReactComponentTreeHook = {
|
|
|
325
375
|
|
|
326
376
|
|
|
327
377
|
getRootIDs: getRootIDs,
|
|
328
|
-
getRegisteredIDs: getItemIDs
|
|
329
|
-
|
|
330
|
-
pushNonStandardWarningStack: function (isCreatingElement, currentSource) {
|
|
331
|
-
if (typeof console.reactStack !== 'function') {
|
|
332
|
-
return;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
var stack = [];
|
|
336
|
-
var currentOwner = ReactCurrentOwner.current;
|
|
337
|
-
var id = currentOwner && currentOwner._debugID;
|
|
338
|
-
|
|
339
|
-
try {
|
|
340
|
-
if (isCreatingElement) {
|
|
341
|
-
stack.push({
|
|
342
|
-
name: id ? ReactComponentTreeHook.getDisplayName(id) : null,
|
|
343
|
-
fileName: currentSource ? currentSource.fileName : null,
|
|
344
|
-
lineNumber: currentSource ? currentSource.lineNumber : null
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
while (id) {
|
|
349
|
-
var element = ReactComponentTreeHook.getElement(id);
|
|
350
|
-
var parentID = ReactComponentTreeHook.getParentID(id);
|
|
351
|
-
var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
|
352
|
-
var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null;
|
|
353
|
-
var source = element && element._source;
|
|
354
|
-
stack.push({
|
|
355
|
-
name: ownerName,
|
|
356
|
-
fileName: source ? source.fileName : null,
|
|
357
|
-
lineNumber: source ? source.lineNumber : null
|
|
358
|
-
});
|
|
359
|
-
id = parentID;
|
|
360
|
-
}
|
|
361
|
-
} catch (err) {
|
|
362
|
-
// Internal state is messed up.
|
|
363
|
-
// Stop building the stack (it's just a nice to have).
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
console.reactStack(stack);
|
|
367
|
-
},
|
|
368
|
-
popNonStandardWarningStack: function () {
|
|
369
|
-
if (typeof console.reactStackEnd !== 'function') {
|
|
370
|
-
return;
|
|
371
|
-
}
|
|
372
|
-
console.reactStackEnd();
|
|
373
|
-
}
|
|
378
|
+
getRegisteredIDs: getItemIDs
|
|
374
379
|
};
|
|
375
380
|
|
|
376
381
|
module.exports = ReactComponentTreeHook;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
* This source code is licensed under the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
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.
|
|
6
8
|
*
|
|
7
9
|
*/
|
|
8
10
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
* This source code is licensed under the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
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.
|
|
6
8
|
*
|
|
7
9
|
*/
|
|
8
10
|
|
package/lib/ReactCurrentOwner.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
* This source code is licensed under the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
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.
|
|
6
8
|
*
|
|
7
9
|
*
|
|
8
10
|
*/
|
|
@@ -16,11 +18,13 @@
|
|
|
16
18
|
* currently being constructed.
|
|
17
19
|
*/
|
|
18
20
|
var ReactCurrentOwner = {
|
|
21
|
+
|
|
19
22
|
/**
|
|
20
23
|
* @internal
|
|
21
24
|
* @type {ReactComponent}
|
|
22
25
|
*/
|
|
23
26
|
current: null
|
|
27
|
+
|
|
24
28
|
};
|
|
25
29
|
|
|
26
30
|
module.exports = ReactCurrentOwner;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
* This source code is licensed under the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
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.
|
|
6
8
|
*
|
|
7
9
|
*/
|
|
8
10
|
|
package/lib/ReactDOMFactories.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
* This source code is licensed under the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
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.
|
|
6
8
|
*
|
|
7
9
|
*/
|
|
8
10
|
|
|
@@ -23,6 +25,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
23
25
|
|
|
24
26
|
/**
|
|
25
27
|
* Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
|
|
28
|
+
* This is also accessible via `React.DOM`.
|
|
26
29
|
*
|
|
27
30
|
* @public
|
|
28
31
|
*/
|
package/lib/ReactElement.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2014-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
* This source code is licensed under the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
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.
|
|
6
8
|
*
|
|
7
9
|
*/
|
|
8
10
|
|
|
@@ -163,7 +165,7 @@ var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
|
163
165
|
|
|
164
166
|
/**
|
|
165
167
|
* Create and return a new ReactElement of the given type.
|
|
166
|
-
* See https://facebook.github.io/react/docs/
|
|
168
|
+
* See https://facebook.github.io/react/docs/react-api.html#createelement
|
|
167
169
|
*/
|
|
168
170
|
ReactElement.createElement = function (type, config, children) {
|
|
169
171
|
var propName;
|
|
@@ -239,7 +241,7 @@ ReactElement.createElement = function (type, config, children) {
|
|
|
239
241
|
|
|
240
242
|
/**
|
|
241
243
|
* Return a function that produces ReactElements of a given type.
|
|
242
|
-
* See https://facebook.github.io/react/docs/
|
|
244
|
+
* See https://facebook.github.io/react/docs/react-api.html#createfactory
|
|
243
245
|
*/
|
|
244
246
|
ReactElement.createFactory = function (type) {
|
|
245
247
|
var factory = ReactElement.createElement.bind(null, type);
|
|
@@ -260,7 +262,7 @@ ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
|
|
|
260
262
|
|
|
261
263
|
/**
|
|
262
264
|
* Clone and return a new ReactElement using element as the starting point.
|
|
263
|
-
* See https://facebook.github.io/react/docs/
|
|
265
|
+
* See https://facebook.github.io/react/docs/react-api.html#cloneelement
|
|
264
266
|
*/
|
|
265
267
|
ReactElement.cloneElement = function (element, config, children) {
|
|
266
268
|
var propName;
|
|
@@ -326,7 +328,7 @@ ReactElement.cloneElement = function (element, config, children) {
|
|
|
326
328
|
|
|
327
329
|
/**
|
|
328
330
|
* Verifies the object is a ReactElement.
|
|
329
|
-
* See https://facebook.github.io/react/docs/
|
|
331
|
+
* See https://facebook.github.io/react/docs/react-api.html#isvalidelement
|
|
330
332
|
* @param {?object} object
|
|
331
333
|
* @return {boolean} True if `object` is a valid component.
|
|
332
334
|
* @final
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2014-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
* This source code is licensed under the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
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.
|
|
6
8
|
*
|
|
7
9
|
*
|
|
8
10
|
*/
|
package/lib/ReactElementType.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2016-present, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
3
4
|
*
|
|
4
|
-
* This source code is licensed under the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
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.
|
|
6
8
|
*
|
|
7
9
|
*
|
|
8
10
|
*/
|