Socket
Socket
Sign inDemoInstall

react

Package Overview
Dependencies
Maintainers
7
Versions
1971
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react - npm Package Compare versions

Comparing version 15.3.0 to 15.3.1-rc.1

lib/ReactChildrenMutationWarningHook.js

12

lib/checkReactTypeSpec.js

@@ -22,3 +22,3 @@ /**

var ReactComponentTreeDevtool;
var ReactComponentTreeHook;

@@ -31,3 +31,3 @@ if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {

// https://github.com/facebook/react/pull/7178
ReactComponentTreeDevtool = require('./ReactComponentTreeDevtool');
ReactComponentTreeHook = require('./ReactComponentTreeHook');
}

@@ -73,9 +73,9 @@

if (process.env.NODE_ENV !== 'production') {
if (!ReactComponentTreeDevtool) {
ReactComponentTreeDevtool = require('./ReactComponentTreeDevtool');
if (!ReactComponentTreeHook) {
ReactComponentTreeHook = require('./ReactComponentTreeHook');
}
if (debugID !== null) {
componentStackInfo = ReactComponentTreeDevtool.getStackAddendumByID(debugID);
componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
} else if (element !== null) {
componentStackInfo = ReactComponentTreeDevtool.getCurrentStackAddendum(element);
componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
}

@@ -82,0 +82,0 @@ }

@@ -30,3 +30,3 @@ /**

this._hostContainerInfo = null;
this._rootNodeID = null;
this._rootNodeID = 0;
this._renderedChildren = null;

@@ -33,0 +33,0 @@ };

@@ -16,3 +16,2 @@ /**

var ReactDOMComponentTree = require('./ReactDOMComponentTree');
var ReactDOMInstrumentation = require('./ReactDOMInstrumentation');
var ReactInstrumentation = require('./ReactInstrumentation');

@@ -82,5 +81,2 @@

createMarkupForProperty: function (name, value) {
if (process.env.NODE_ENV !== 'production') {
ReactDOMInstrumentation.debugTool.onCreateMarkupForProperty(name, value);
}
var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;

@@ -158,3 +154,2 @@ if (propertyInfo) {

if (process.env.NODE_ENV !== 'production') {
ReactDOMInstrumentation.debugTool.onSetValueForProperty(node, name, value);
var payload = {};

@@ -192,3 +187,2 @@ payload[name] = value;

if (process.env.NODE_ENV !== 'production') {
ReactDOMInstrumentation.debugTool.onDeleteValueForProperty(node, name);
ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'remove attribute', name);

@@ -225,3 +219,2 @@ }

if (process.env.NODE_ENV !== 'production') {
ReactDOMInstrumentation.debugTool.onDeleteValueForProperty(node, name);
ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'remove attribute', name);

@@ -228,0 +221,0 @@ }

@@ -59,2 +59,4 @@ /**

var getDictionaryKey = function (inst) {
// Prevents V8 performance issue:
// https://github.com/facebook/react/pull/7232
return '.' + inst._rootNodeID;

@@ -61,0 +63,0 @@ };

@@ -19,3 +19,3 @@ /**

var ReactComponentTreeDevtool;
var ReactComponentTreeHook;

@@ -28,3 +28,3 @@ if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {

// https://github.com/facebook/react/pull/7178
ReactComponentTreeDevtool = require('./ReactComponentTreeDevtool');
ReactComponentTreeHook = require('./ReactComponentTreeHook');
}

@@ -44,6 +44,8 @@

if (process.env.NODE_ENV !== 'production') {
if (!ReactComponentTreeDevtool) {
ReactComponentTreeDevtool = require('./ReactComponentTreeDevtool');
if (!ReactComponentTreeHook) {
ReactComponentTreeHook = require('./ReactComponentTreeHook');
}
process.env.NODE_ENV !== 'production' ? warning(keyUnique, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeDevtool.getStackAddendumByID(selfDebugID)) : void 0;
if (!keyUnique) {
process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
}
}

@@ -50,0 +52,0 @@ if (keyUnique && child != null) {

@@ -20,3 +20,2 @@ /**

var ReactHostComponent = require('./ReactHostComponent');
var ReactInstrumentation = require('./ReactInstrumentation');

@@ -44,17 +43,2 @@ var invariant = require('fbjs/lib/invariant');

function getDisplayName(instance) {
var element = instance._currentElement;
if (element == null) {
return '#empty';
} else if (typeof element === 'string' || typeof element === 'number') {
return '#text';
} else if (typeof element.type === 'string') {
return element.type;
} else if (instance.getName) {
return instance.getName() || 'Unknown';
} else {
return element.type.displayName || element.type.name || 'Unknown';
}
}
/**

@@ -123,14 +107,3 @@ * Check if the type reference is a known internal type. I.e. not a user

if (process.env.NODE_ENV !== 'production') {
if (shouldHaveDebugID) {
var debugID = nextDebugID++;
instance._debugID = debugID;
var displayName = getDisplayName(instance);
ReactInstrumentation.debugTool.onSetDisplayName(debugID, displayName);
var owner = node && node._owner;
if (owner) {
ReactInstrumentation.debugTool.onSetOwner(debugID, owner._debugID);
}
} else {
instance._debugID = 0;
}
instance._debugID = shouldHaveDebugID ? nextDebugID++ : 0;
}

@@ -137,0 +110,0 @@

@@ -22,3 +22,3 @@ /**

var ReactComponentTreeDevtool;
var ReactComponentTreeHook;

@@ -31,3 +31,3 @@ if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {

// https://github.com/facebook/react/pull/7178
ReactComponentTreeDevtool = require('./ReactComponentTreeDevtool');
ReactComponentTreeHook = require('./ReactComponentTreeHook');
}

@@ -39,6 +39,8 @@

if (process.env.NODE_ENV !== 'production') {
if (!ReactComponentTreeDevtool) {
ReactComponentTreeDevtool = require('./ReactComponentTreeDevtool');
if (!ReactComponentTreeHook) {
ReactComponentTreeHook = require('./ReactComponentTreeHook');
}
process.env.NODE_ENV !== 'production' ? warning(keyUnique, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeDevtool.getStackAddendumByID(selfDebugID)) : void 0;
if (!keyUnique) {
process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
}
}

@@ -64,3 +66,3 @@ if (child != null && keyUnique) {

*/
instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // __DEV__ only
instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots
) {

@@ -92,3 +94,4 @@ if (nestedChildNodes == null) {

*/
updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context) {
updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots
) {
// We currently don't have a way to track moves here but if we use iterators

@@ -124,3 +127,3 @@ // instead of for..in we can zip the iterators and check if an item has

// (see https://github.com/facebook/react/pull/7101 for explanation).
var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context);
var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
mountImages.push(nextChildMountImage);

@@ -127,0 +130,0 @@ }

@@ -26,15 +26,6 @@ /**

replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup,
replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
/**
* If a particular environment requires that some resources be cleaned up,
* specify this in the injected Mixin. In the DOM, we would likely want to
* purge any cached node ID lookups.
*
* @private
*/
unmountIDFromEnvironment: function (rootNodeID) {}
};
module.exports = ReactComponentBrowserEnvironment;

@@ -23,9 +23,2 @@ /**

/**
* Optionally injectable environment dependent cleanup hook. (server vs.
* browser etc). Example: A browser system caches DOM nodes based on component
* ID and must remove that cache entry when this instance is unmounted.
*/
unmountIDFromEnvironment: null,
/**
* Optionally injectable hook for swapping out mount images in the middle of

@@ -45,3 +38,2 @@ * the tree.

!!injected ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;
ReactComponentEnvironment.unmountIDFromEnvironment = environment.unmountIDFromEnvironment;
ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;

@@ -48,0 +40,0 @@ ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;

@@ -11,209 +11,6 @@ /**

*/
'use strict';
var _prodInvariant = require('./reactProdInvariant');
// TODO remove this proxy when RN/www gets updated
var ReactCurrentOwner = require('./ReactCurrentOwner');
var invariant = require('fbjs/lib/invariant');
var warning = require('fbjs/lib/warning');
var tree = {};
var unmountedIDs = {};
var rootIDs = {};
function updateTree(id, update) {
if (!tree[id]) {
tree[id] = {
element: null,
parentID: null,
ownerID: null,
text: null,
childIDs: [],
displayName: 'Unknown',
isMounted: false,
updateCount: 0
};
}
update(tree[id]);
}
function purgeDeep(id) {
var item = tree[id];
if (item) {
var childIDs = item.childIDs;
delete tree[id];
childIDs.forEach(purgeDeep);
}
}
function describeComponentFrame(name, source, ownerName) {
return '\n in ' + name + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
}
function describeID(id) {
var name = ReactComponentTreeDevtool.getDisplayName(id);
var element = ReactComponentTreeDevtool.getElement(id);
var ownerID = ReactComponentTreeDevtool.getOwnerID(id);
var ownerName;
if (ownerID) {
ownerName = ReactComponentTreeDevtool.getDisplayName(ownerID);
}
process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeDevtool: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
return describeComponentFrame(name, element && element._source, ownerName);
}
var ReactComponentTreeDevtool = {
onSetDisplayName: function (id, displayName) {
updateTree(id, function (item) {
return item.displayName = displayName;
});
},
onSetChildren: function (id, nextChildIDs) {
updateTree(id, function (item) {
item.childIDs = nextChildIDs;
nextChildIDs.forEach(function (nextChildID) {
var nextChild = tree[nextChildID];
!nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected devtool events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('68') : void 0;
!(nextChild.displayName != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetDisplayName() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('69') : void 0;
!(nextChild.childIDs != null || nextChild.text != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() or onSetText() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('70') : void 0;
!nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
if (nextChild.parentID == null) {
nextChild.parentID = id;
// TODO: This shouldn't be necessary but mounting a new root during in
// componentWillMount currently causes not-yet-mounted components to
// be purged from our tree data so their parent ID is missing.
}
!(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetParent() and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('72', nextChildID, nextChild.parentID, id) : void 0;
});
});
},
onSetOwner: function (id, ownerID) {
updateTree(id, function (item) {
return item.ownerID = ownerID;
});
},
onSetParent: function (id, parentID) {
updateTree(id, function (item) {
return item.parentID = parentID;
});
},
onSetText: function (id, text) {
updateTree(id, function (item) {
return item.text = text;
});
},
onBeforeMountComponent: function (id, element) {
updateTree(id, function (item) {
return item.element = element;
});
},
onBeforeUpdateComponent: function (id, element) {
updateTree(id, function (item) {
return item.element = element;
});
},
onMountComponent: function (id) {
updateTree(id, function (item) {
return item.isMounted = true;
});
},
onMountRootComponent: function (id) {
rootIDs[id] = true;
},
onUpdateComponent: function (id) {
updateTree(id, function (item) {
return item.updateCount++;
});
},
onUnmountComponent: function (id) {
updateTree(id, function (item) {
return item.isMounted = false;
});
unmountedIDs[id] = true;
delete rootIDs[id];
},
purgeUnmountedComponents: function () {
if (ReactComponentTreeDevtool._preventPurging) {
// Should only be used for testing.
return;
}
for (var id in unmountedIDs) {
purgeDeep(id);
}
unmountedIDs = {};
},
isMounted: function (id) {
var item = tree[id];
return item ? item.isMounted : false;
},
getCurrentStackAddendum: function (topElement) {
var info = '';
if (topElement) {
var type = topElement.type;
var name = typeof type === 'function' ? type.displayName || type.name : type;
var owner = topElement._owner;
info += describeComponentFrame(name || 'Unknown', topElement._source, owner && owner.getName());
}
var currentOwner = ReactCurrentOwner.current;
var id = currentOwner && currentOwner._debugID;
info += ReactComponentTreeDevtool.getStackAddendumByID(id);
return info;
},
getStackAddendumByID: function (id) {
var info = '';
while (id) {
info += describeID(id);
id = ReactComponentTreeDevtool.getParentID(id);
}
return info;
},
getChildIDs: function (id) {
var item = tree[id];
return item ? item.childIDs : [];
},
getDisplayName: function (id) {
var item = tree[id];
return item ? item.displayName : 'Unknown';
},
getElement: function (id) {
var item = tree[id];
return item ? item.element : null;
},
getOwnerID: function (id) {
var item = tree[id];
return item ? item.ownerID : null;
},
getParentID: function (id) {
var item = tree[id];
return item ? item.parentID : null;
},
getSource: function (id) {
var item = tree[id];
var element = item ? item.element : null;
var source = element != null ? element._source : null;
return source;
},
getText: function (id) {
var item = tree[id];
return item ? item.text : null;
},
getUpdateCount: function (id) {
var item = tree[id];
return item ? item.updateCount : 0;
},
getRootIDs: function () {
return Object.keys(rootIDs);
},
getRegisteredIDs: function () {
return Object.keys(tree);
}
};
module.exports = ReactComponentTreeDevtool;
module.exports = require('./ReactComponentTreeHook');

@@ -20,19 +20,19 @@ /**

var ReactComponentTreeDevtool = require('./ReactComponentTreeDevtool');
var ReactComponentTreeHook = require('./ReactComponentTreeHook');
function getRootDisplayNames() {
return ReactComponentTreeDevtool.getRootIDs().map(ReactComponentTreeDevtool.getDisplayName);
return ReactComponentTreeHook.getRootIDs().map(ReactComponentTreeHook.getDisplayName);
}
function getRegisteredDisplayNames() {
return ReactComponentTreeDevtool.getRegisteredIDs().map(ReactComponentTreeDevtool.getDisplayName);
return ReactComponentTreeHook.getRegisteredIDs().map(ReactComponentTreeHook.getDisplayName);
}
function expectTree(rootID, expectedTree, parentPath) {
var displayName = ReactComponentTreeDevtool.getDisplayName(rootID);
var ownerID = ReactComponentTreeDevtool.getOwnerID(rootID);
var parentID = ReactComponentTreeDevtool.getParentID(rootID);
var childIDs = ReactComponentTreeDevtool.getChildIDs(rootID);
var text = ReactComponentTreeDevtool.getText(rootID);
var element = ReactComponentTreeDevtool.getElement(rootID);
var displayName = ReactComponentTreeHook.getDisplayName(rootID);
var ownerID = ReactComponentTreeHook.getOwnerID(rootID);
var parentID = ReactComponentTreeHook.getParentID(rootID);
var childIDs = ReactComponentTreeHook.getChildIDs(rootID);
var text = ReactComponentTreeHook.getText(rootID);
var element = ReactComponentTreeHook.getElement(rootID);
var path = parentPath ? parentPath + ' > ' + displayName : displayName;

@@ -51,6 +51,6 @@

if (expectedTree.parentDisplayName !== undefined) {
expectEqual(ReactComponentTreeDevtool.getDisplayName(parentID), expectedTree.parentDisplayName, 'parentDisplayName');
expectEqual(ReactComponentTreeHook.getDisplayName(parentID), expectedTree.parentDisplayName, 'parentDisplayName');
}
if (expectedTree.ownerDisplayName !== undefined) {
expectEqual(ReactComponentTreeDevtool.getDisplayName(ownerID), expectedTree.ownerDisplayName, 'ownerDisplayName');
expectEqual(ReactComponentTreeHook.getDisplayName(ownerID), expectedTree.ownerDisplayName, 'ownerDisplayName');
}

@@ -57,0 +57,0 @@ if (expectedTree.parentID !== undefined) {

@@ -134,3 +134,3 @@ /**

this._currentElement = element;
this._rootNodeID = null;
this._rootNodeID = 0;
this._compositeType = null;

@@ -177,4 +177,2 @@ this._instance = null;

mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
var _this = this;
this._context = context;

@@ -275,11 +273,2 @@ this._mountOrder = nextMountID++;

if (process.env.NODE_ENV !== 'production') {
if (this._debugID) {
var callback = function (component) {
return ReactInstrumentation.debugTool.onComponentHasMounted(_this._debugID);
};
transaction.getReactMountReady().enqueue(callback, this);
}
}
return markup;

@@ -394,10 +383,9 @@ },

this._renderedComponent = child;
var selfDebugID = 0;
if (process.env.NODE_ENV !== 'production') {
if (child._debugID !== 0 && this._debugID !== 0) {
ReactInstrumentation.debugTool.onSetParent(child._debugID, this._debugID);
}
selfDebugID = this._debugID;
}
var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), selfDebugID);
var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context));
if (process.env.NODE_ENV !== 'production') {

@@ -467,3 +455,3 @@ if (this._debugID !== 0) {

this._context = null;
this._rootNodeID = null;
this._rootNodeID = 0;
this._topLevelWrapper = null;

@@ -724,4 +712,2 @@

_performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
var _this2 = this;
var inst = this._instance;

@@ -768,11 +754,2 @@

}
if (process.env.NODE_ENV !== 'production') {
if (this._debugID) {
var callback = function () {
return ReactInstrumentation.debugTool.onComponentHasUpdated(_this2._debugID);
};
transaction.getReactMountReady().enqueue(callback, this);
}
}
},

@@ -801,10 +778,9 @@

this._renderedComponent = child;
var selfDebugID = 0;
if (process.env.NODE_ENV !== 'production') {
if (child._debugID !== 0 && this._debugID !== 0) {
ReactInstrumentation.debugTool.onSetParent(child._debugID, this._debugID);
}
selfDebugID = this._debugID;
}
var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), selfDebugID);
var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context));
if (process.env.NODE_ENV !== 'production') {

@@ -811,0 +787,0 @@ if (this._debugID !== 0) {

@@ -14,6 +14,6 @@ /**

var ReactInvalidSetStateWarningDevTool = require('./ReactInvalidSetStateWarningDevTool');
var ReactHostOperationHistoryDevtool = require('./ReactHostOperationHistoryDevtool');
var ReactComponentTreeDevtool = require('./ReactComponentTreeDevtool');
var ReactChildrenMutationWarningDevtool = require('./ReactChildrenMutationWarningDevtool');
var ReactInvalidSetStateWarningHook = require('./ReactInvalidSetStateWarningHook');
var ReactHostOperationHistoryHook = require('./ReactHostOperationHistoryHook');
var ReactComponentTreeHook = require('./ReactComponentTreeHook');
var ReactChildrenMutationWarningHook = require('./ReactChildrenMutationWarningHook');
var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');

@@ -24,16 +24,22 @@

var eventHandlers = [];
var handlerDoesThrowForEvent = {};
var hooks = [];
var didHookThrowForEvent = {};
function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) {
eventHandlers.forEach(function (handler) {
try {
if (handler[handlerFunctionName]) {
handler[handlerFunctionName](arg1, arg2, arg3, arg4, arg5);
}
} catch (e) {
process.env.NODE_ENV !== 'production' ? warning(handlerDoesThrowForEvent[handlerFunctionName], 'exception thrown by devtool while handling %s: %s', handlerFunctionName, e + '\n' + e.stack) : void 0;
handlerDoesThrowForEvent[handlerFunctionName] = true;
function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
try {
fn.call(context, arg1, arg2, arg3, arg4, arg5);
} catch (e) {
process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0;
didHookThrowForEvent[event] = true;
}
}
function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
for (var i = 0; i < hooks.length; i++) {
var hook = hooks[i];
var fn = hook[event];
if (fn) {
callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
}
});
}
}

@@ -55,4 +61,4 @@

function clearHistory() {
ReactComponentTreeDevtool.purgeUnmountedComponents();
ReactHostOperationHistoryDevtool.clearHistory();
ReactComponentTreeHook.purgeUnmountedComponents();
ReactHostOperationHistoryHook.clearHistory();
}

@@ -62,11 +68,11 @@

return registeredIDs.reduce(function (tree, id) {
var ownerID = ReactComponentTreeDevtool.getOwnerID(id);
var parentID = ReactComponentTreeDevtool.getParentID(id);
var ownerID = ReactComponentTreeHook.getOwnerID(id);
var parentID = ReactComponentTreeHook.getParentID(id);
tree[id] = {
displayName: ReactComponentTreeDevtool.getDisplayName(id),
text: ReactComponentTreeDevtool.getText(id),
updateCount: ReactComponentTreeDevtool.getUpdateCount(id),
childIDs: ReactComponentTreeDevtool.getChildIDs(id),
displayName: ReactComponentTreeHook.getDisplayName(id),
text: ReactComponentTreeHook.getText(id),
updateCount: ReactComponentTreeHook.getUpdateCount(id),
childIDs: ReactComponentTreeHook.getChildIDs(id),
// Text nodes don't have owners but this is close enough.
ownerID: ownerID || ReactComponentTreeDevtool.getOwnerID(parentID),
ownerID: ownerID || ReactComponentTreeHook.getOwnerID(parentID),
parentID: parentID

@@ -81,3 +87,3 @@ };

var previousMeasurements = currentFlushMeasurements || [];
var previousOperations = ReactHostOperationHistoryDevtool.getHistory();
var previousOperations = ReactHostOperationHistoryHook.getHistory();

@@ -92,3 +98,3 @@ if (currentFlushNesting === 0) {

if (previousMeasurements.length || previousOperations.length) {
var registeredIDs = ReactComponentTreeDevtool.getRegisteredIDs();
var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
flushHistory.push({

@@ -108,3 +114,10 @@ duration: performanceNow() - previousStartTime,

function checkDebugID(debugID) {
process.env.NODE_ENV !== 'production' ? warning(debugID, 'ReactDebugTool: debugID may not be empty.') : void 0;
var allowRoot = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
if (allowRoot && debugID === 0) {
return;
}
if (!debugID) {
process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;
}
}

@@ -177,9 +190,9 @@

var ReactDebugTool = {
addDevtool: function (devtool) {
eventHandlers.push(devtool);
addHook: function (hook) {
hooks.push(hook);
},
removeDevtool: function (devtool) {
for (var i = 0; i < eventHandlers.length; i++) {
if (eventHandlers[i] === devtool) {
eventHandlers.splice(i, 1);
removeHook: function (hook) {
for (var i = 0; i < hooks.length; i++) {
if (hooks[i] === hook) {
hooks.splice(i, 1);
i--;

@@ -200,3 +213,3 @@ }

resetMeasurements();
ReactDebugTool.addDevtool(ReactHostOperationHistoryDevtool);
ReactDebugTool.addHook(ReactHostOperationHistoryHook);
},

@@ -210,3 +223,3 @@ endProfiling: function () {

resetMeasurements();
ReactDebugTool.removeDevtool(ReactHostOperationHistoryDevtool);
ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
},

@@ -238,10 +251,2 @@ getFlushHistory: function () {

},
onBeginReconcilerTimer: function (debugID, timerType) {
checkDebugID(debugID);
emitEvent('onBeginReconcilerTimer', debugID, timerType);
},
onEndReconcilerTimer: function (debugID, timerType) {
checkDebugID(debugID);
emitEvent('onEndReconcilerTimer', debugID, timerType);
},
onError: function (debugID) {

@@ -263,17 +268,5 @@ if (currentTimerDebugID != null) {

},
onComponentHasMounted: function (debugID) {
checkDebugID(debugID);
emitEvent('onComponentHasMounted', debugID);
},
onComponentHasUpdated: function (debugID) {
checkDebugID(debugID);
emitEvent('onComponentHasUpdated', debugID);
},
onSetState: function () {
emitEvent('onSetState');
},
onSetDisplayName: function (debugID, displayName) {
checkDebugID(debugID);
emitEvent('onSetDisplayName', debugID, displayName);
},
onSetChildren: function (debugID, childDebugIDs) {

@@ -284,22 +277,7 @@ checkDebugID(debugID);

},
onSetOwner: function (debugID, ownerDebugID) {
onBeforeMountComponent: function (debugID, element, parentDebugID) {
checkDebugID(debugID);
emitEvent('onSetOwner', debugID, ownerDebugID);
checkDebugID(parentDebugID, true);
emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
},
onSetParent: function (debugID, parentDebugID) {
checkDebugID(debugID);
emitEvent('onSetParent', debugID, parentDebugID);
},
onSetText: function (debugID, text) {
checkDebugID(debugID);
emitEvent('onSetText', debugID, text);
},
onMountRootComponent: function (debugID) {
checkDebugID(debugID);
emitEvent('onMountRootComponent', debugID);
},
onBeforeMountComponent: function (debugID, element) {
checkDebugID(debugID);
emitEvent('onBeforeMountComponent', debugID, element);
},
onMountComponent: function (debugID) {

@@ -317,2 +295,6 @@ checkDebugID(debugID);

},
onBeforeUnmountComponent: function (debugID) {
checkDebugID(debugID);
emitEvent('onBeforeUnmountComponent', debugID);
},
onUnmountComponent: function (debugID) {

@@ -327,5 +309,9 @@ checkDebugID(debugID);

ReactDebugTool.addDevtool(ReactInvalidSetStateWarningDevTool);
ReactDebugTool.addDevtool(ReactComponentTreeDevtool);
ReactDebugTool.addDevtool(ReactChildrenMutationWarningDevtool);
// TODO remove these when RN/www gets updated
ReactDebugTool.addDevtool = ReactDebugTool.addHook;
ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
ReactDebugTool.addHook(ReactComponentTreeHook);
ReactDebugTool.addHook(ReactChildrenMutationWarningHook);
var url = ExecutionEnvironment.canUseDOM && window.location.href || '';

@@ -332,0 +318,0 @@ if (/[?&]react_perf\b/.test(url)) {

@@ -101,2 +101,11 @@ /**

if (process.env.NODE_ENV !== 'production') {
var ReactInstrumentation = require('./ReactInstrumentation');
var ReactDOMUnknownPropertyHook = require('./ReactDOMUnknownPropertyHook');
var ReactDOMNullInputValuePropHook = require('./ReactDOMNullInputValuePropHook');
ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook);
ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook);
}
module.exports = ReactDOM;

@@ -29,3 +29,2 @@ /**

var ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter');
var ReactComponentBrowserEnvironment = require('./ReactComponentBrowserEnvironment');
var ReactDOMButton = require('./ReactDOMButton');

@@ -216,8 +215,2 @@ var ReactDOMComponentFlags = require('./ReactDOMComponentFlags');

this._contentDebugID = contentDebugID;
var text = '' + content;
ReactInstrumentation.debugTool.onSetDisplayName(contentDebugID, '#text');
ReactInstrumentation.debugTool.onSetParent(contentDebugID, debugID);
ReactInstrumentation.debugTool.onSetText(contentDebugID, text);
if (hasExistingContent) {

@@ -227,3 +220,3 @@ ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);

} else {
ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content);
ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);
ReactInstrumentation.debugTool.onMountComponent(contentDebugID);

@@ -389,4 +382,4 @@ ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);

this._hostParent = null;
this._rootNodeID = null;
this._domID = null;
this._rootNodeID = 0;
this._domID = 0;
this._hostContainerInfo = null;

@@ -412,3 +405,3 @@ this._wrapperState = null;

* @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
* @param {?ReactDOMComponent} the containing DOM component instance
* @param {?ReactDOMComponent} the parent component instance
* @param {?object} info about the host container

@@ -419,4 +412,2 @@ * @param {object} context

mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
var _this = this;
this._rootNodeID = globalIdCounter++;

@@ -577,11 +568,2 @@ this._domID = hostContainerInfo._idCounter++;

if (process.env.NODE_ENV !== 'production') {
if (this._debugID) {
var callback = function () {
return ReactInstrumentation.debugTool.onComponentHasMounted(_this._debugID);
};
transaction.getReactMountReady().enqueue(callback, this);
}
}
return mountImage;

@@ -755,4 +737,2 @@ },

updateComponent: function (transaction, prevElement, nextElement, context) {
var _this2 = this;
var lastProps = prevElement.props;

@@ -767,3 +747,2 @@ var nextProps = this._currentElement.props;

case 'input':
ReactDOMInput.updateWrapper(this);
lastProps = ReactDOMInput.getHostProps(this, lastProps);

@@ -781,3 +760,2 @@ nextProps = ReactDOMInput.getHostProps(this, nextProps);

case 'textarea':
ReactDOMTextarea.updateWrapper(this);
lastProps = ReactDOMTextarea.getHostProps(this, lastProps);

@@ -792,16 +770,18 @@ nextProps = ReactDOMTextarea.getHostProps(this, nextProps);

if (this._tag === 'select') {
// <select> value update needs to occur after <option> children
// reconciliation
transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
switch (this._tag) {
case 'input':
// Update the wrapper around inputs *after* updating props. This has to
// happen after `_updateDOMProperties`. Otherwise HTML5 input validations
// raise warnings and prevent the new value from being assigned.
ReactDOMInput.updateWrapper(this);
break;
case 'textarea':
ReactDOMTextarea.updateWrapper(this);
break;
case 'select':
// <select> value update needs to occur after <option> children
// reconciliation
transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
break;
}
if (process.env.NODE_ENV !== 'production') {
if (this._debugID) {
var callback = function () {
return ReactInstrumentation.debugTool.onComponentHasUpdated(_this2._debugID);
};
transaction.getReactMountReady().enqueue(callback, this);
}
}
},

@@ -1018,5 +998,4 @@

EventPluginHub.deleteAllListeners(this);
ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);
this._rootNodeID = null;
this._domID = null;
this._rootNodeID = 0;
this._domID = 0;
this._wrapperState = null;

@@ -1023,0 +1002,0 @@

@@ -85,3 +85,3 @@ /**

var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
if (childID == null) {
if (childID === 0) {
// We're currently unmounting this child in ReactMultiChild; skip it.

@@ -88,0 +88,0 @@ continue;

@@ -26,3 +26,3 @@ /**

this._hostContainerInfo = null;
this._domID = null;
this._domID = 0;
};

@@ -29,0 +29,0 @@ _assign(ReactDOMEmptyComponent.prototype, {

@@ -178,4 +178,22 @@ /**

// provided.
if (props.type !== 'submit' && props.type !== 'reset') {
node.value = node.value;
switch (props.type) {
case 'submit':
case 'reset':
break;
case 'color':
case 'date':
case 'datetime':
case 'datetime-local':
case 'month':
case 'time':
case 'week':
// This fixes the no-show issue on iOS Safari and Android Chrome:
// https://github.com/facebook/react/issues/7233
node.value = '';
node.value = node.defaultValue;
break;
default:
node.value = node.value;
break;
}

@@ -182,0 +200,0 @@

@@ -69,6 +69,7 @@ /**

}
if (props.multiple) {
process.env.NODE_ENV !== 'production' ? warning(Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
} else {
process.env.NODE_ENV !== 'production' ? warning(!Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
var isArray = Array.isArray(props[propName]);
if (props.multiple && !isArray) {
process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
} else if (!props.multiple && isArray) {
process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
}

@@ -75,0 +76,0 @@ }

@@ -20,3 +20,2 @@ /**

var ReactDOMComponentTree = require('./ReactDOMComponentTree');
var ReactInstrumentation = require('./ReactInstrumentation');

@@ -51,3 +50,3 @@ var escapeTextContentForBrowser = require('./escapeTextContentForBrowser');

// Properties
this._domID = null;
this._domID = 0;
this._mountIndex = 0;

@@ -70,4 +69,2 @@ this._closingComment = null;

if (process.env.NODE_ENV !== 'production') {
ReactInstrumentation.debugTool.onSetText(this._debugID, this._stringText);
var parentInfo;

@@ -136,6 +133,2 @@ if (hostParent != null) {

DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);
if (process.env.NODE_ENV !== 'production') {
ReactInstrumentation.debugTool.onSetText(this._debugID, nextStringText);
}
}

@@ -142,0 +135,0 @@ }

@@ -22,3 +22,3 @@ /**

var ReactCurrentOwner = require('./ReactCurrentOwner');
var ReactComponentTreeDevtool = require('./ReactComponentTreeDevtool');
var ReactComponentTreeHook = require('./ReactComponentTreeHook');
var ReactElement = require('./ReactElement');

@@ -96,3 +96,3 @@ var ReactPropTypeLocations = require('./ReactPropTypeLocations');

process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeDevtool.getCurrentStackAddendum(element)) : void 0;
process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;
}

@@ -168,3 +168,5 @@

// succeed and there will likely be errors in render.
process.env.NODE_ENV !== 'production' ? warning(validType, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0;
if (!validType) {
process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0;
}

@@ -171,0 +173,0 @@ var element = ReactElement.createElement.apply(this, arguments);

@@ -105,3 +105,4 @@ /**

var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context);
var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */
);

@@ -264,3 +265,3 @@ if (markerName) {

/**
* Render a new component into the DOM. Hooked by devtools!
* Render a new component into the DOM. Hooked by hooks!
*

@@ -292,7 +293,2 @@ * @param {ReactElement} nextElement element to render

if (process.env.NODE_ENV !== 'production') {
// The instance here is TopLevelWrapper so we report mount for its child.
ReactInstrumentation.debugTool.onMountRootComponent(componentInstance._renderedComponent._debugID);
}
return componentInstance;

@@ -299,0 +295,0 @@ },

@@ -142,3 +142,2 @@ /**

var setParentForInstrumentation = emptyFunction;
var setChildrenForInstrumentation = emptyFunction;

@@ -156,7 +155,2 @@ if (process.env.NODE_ENV !== 'production') {

};
setParentForInstrumentation = function (child) {
if (child._debugID !== 0) {
ReactInstrumentation.debugTool.onSetParent(child._debugID, getDebugID(this));
}
};
setChildrenForInstrumentation = function (children) {

@@ -193,6 +187,7 @@ var debugID = getDebugID(this);

if (process.env.NODE_ENV !== 'production') {
var selfDebugID = getDebugID(this);
if (this._currentElement) {
try {
ReactCurrentOwner.current = this._currentElement._owner;
return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, this._debugID);
return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);
} finally {

@@ -208,16 +203,18 @@ ReactCurrentOwner.current = null;

var nextChildren;
var selfDebugID = 0;
if (process.env.NODE_ENV !== 'production') {
selfDebugID = getDebugID(this);
if (this._currentElement) {
try {
ReactCurrentOwner.current = this._currentElement._owner;
nextChildren = flattenChildren(nextNestedChildrenElements, this._debugID);
nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
} finally {
ReactCurrentOwner.current = null;
}
ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context);
ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
return nextChildren;
}
}
nextChildren = flattenChildren(nextNestedChildrenElements);
ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context);
nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
return nextChildren;

@@ -243,6 +240,7 @@ },

var child = children[name];
var selfDebugID = 0;
if (process.env.NODE_ENV !== 'production') {
setParentForInstrumentation.call(this, child);
selfDebugID = getDebugID(this);
}
var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context);
var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
child._mountIndex = index++;

@@ -249,0 +247,0 @@ mountImages.push(mountImage);

@@ -57,3 +57,3 @@ /**

this.unmountChildren();
this._rootNodeID = null;
this._rootNodeID = 0;
},

@@ -159,4 +159,6 @@

/**
* @param {string} rootID Root ID of this subtree.
* @param {Transaction} transaction For creating/updating.
* @param {ReactNativeReconcileTransaction} transaction
* @param {?ReactNativeBaseComponent} the parent component instance
* @param {?object} info about the host container
* @param {object} context
* @return {string} Unique iOS view tag.

@@ -163,0 +165,0 @@ */

@@ -24,9 +24,2 @@ /**

/**
* Nothing to do for UIKit bridge.
*
* @private
*/
unmountIDFromEnvironment: function () /*rootNodeID*/{},
/**
* @param {DOMElement} Element to clear.

@@ -33,0 +26,0 @@ */

@@ -51,3 +51,4 @@ /**

function mountComponentIntoNode(componentInstance, containerTag, transaction) {
var markup = ReactReconciler.mountComponent(componentInstance, transaction, null, ReactNativeContainerInfo(containerTag), emptyObject);
var markup = ReactReconciler.mountComponent(componentInstance, transaction, null, ReactNativeContainerInfo(containerTag), emptyObject, 0 /* parentDebugID */
);
componentInstance._renderedComponent._topLevelWrapper = componentInstance;

@@ -118,6 +119,2 @@ ReactNativeMount._mountImageIntoNode(markup, containerTag);

ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, instance, containerTag);
if (process.env.NODE_ENV !== 'production') {
// The instance here is TopLevelWrapper so we report mount for its child.
ReactInstrumentation.debugTool.onMountRootComponent(instance._renderedComponent._debugID);
}
var component = instance.getPublicInstance();

@@ -124,0 +121,0 @@ if (callback) {

@@ -17,3 +17,2 @@ /**

var ReactInstrumentation = require('./ReactInstrumentation');
var ReactNativeComponentTree = require('./ReactNativeComponentTree');

@@ -30,3 +29,3 @@ var ReactNativeTagHandles = require('./ReactNativeTagHandles');

this._hostParent = null;
this._rootNodeID = null;
this._rootNodeID = 0;
};

@@ -37,6 +36,2 @@

mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
if (process.env.NODE_ENV !== 'production') {
ReactInstrumentation.debugTool.onSetText(this._debugID, this._stringText);
}
// TODO: hostParent should have this context already. Stop abusing context.

@@ -66,5 +61,2 @@ !context.isInAParentText ? process.env.NODE_ENV !== 'production' ? invariant(false, 'RawText "%s" must be wrapped in an explicit <Text> component.', this._stringText) : _prodInvariant('20', this._stringText) : void 0;

UIManager.updateView(this._rootNodeID, 'RCTRawText', { text: this._stringText });
if (process.env.NODE_ENV !== 'production') {
ReactInstrumentation.debugTool.onSetText(this._debugID, nextStringText);
}
}

@@ -78,3 +70,3 @@ }

this._stringText = null;
this._rootNodeID = null;
this._rootNodeID = 0;
}

@@ -81,0 +73,0 @@

@@ -40,10 +40,10 @@ /**

*/
mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context) {
mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots
) {
if (process.env.NODE_ENV !== 'production') {
if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement);
ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'mountComponent');
ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
}
}
var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context);
var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {

@@ -54,3 +54,2 @@ transaction.getReactMountReady().enqueue(attachRefs, internalInstance);

if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'mountComponent');
ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);

@@ -79,3 +78,3 @@ }

if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'unmountComponent');
ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
}

@@ -87,3 +86,2 @@ }

if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'unmountComponent');
ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);

@@ -123,3 +121,2 @@ }

ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'receiveComponent');
}

@@ -142,3 +139,2 @@ }

if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'receiveComponent');
ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);

@@ -165,3 +161,2 @@ }

if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'performUpdateIfNecessary');
ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);

@@ -173,3 +168,2 @@ }

if (internalInstance._debugID !== 0) {
ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'performUpdateIfNecessary');
ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);

@@ -176,0 +170,0 @@ }

@@ -46,3 +46,4 @@ /**

var componentInstance = instantiateReactComponent(element, true);
var markup = ReactReconciler.mountComponent(componentInstance, transaction, null, ReactDOMContainerInfo(), emptyObject);
var markup = ReactReconciler.mountComponent(componentInstance, transaction, null, ReactDOMContainerInfo(), emptyObject, 0 /* parentDebugID */
);
if (process.env.NODE_ENV !== 'production') {

@@ -49,0 +50,0 @@ ReactInstrumentation.debugTool.onUnmountComponent(componentInstance._debugID);

@@ -23,4 +23,5 @@ /**

_assign(ReactSimpleEmptyComponent.prototype, {
mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
return ReactReconciler.mountComponent(this._renderedComponent, transaction, hostParent, hostContainerInfo, context);
mountComponent: function (transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots
) {
return ReactReconciler.mountComponent(this._renderedComponent, transaction, hostParent, hostContainerInfo, context, parentDebugID);
},

@@ -27,0 +28,0 @@ receiveComponent: function () {},

@@ -17,3 +17,2 @@ /**

var ReactElement = require('./ReactElement');
var ReactInstrumentation = require('./ReactInstrumentation');
var ReactReconciler = require('./ReactReconciler');

@@ -120,6 +119,2 @@ var ReactUpdates = require('./ReactUpdates');

ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, instance);
if (process.env.NODE_ENV !== 'production') {
// The instance here is TopLevelWrapper so we report mount for its child.
ReactInstrumentation.debugTool.onMountRootComponent(instance._renderedComponent._debugID);
}
return new ReactTestInstance(instance);

@@ -126,0 +121,0 @@ }

@@ -29,3 +29,2 @@ /**

var ReactInstanceMap = require('./ReactInstanceMap');
var ReactInstrumentation = require('./ReactInstrumentation');
var ReactReconciler = require('./ReactReconciler');

@@ -323,3 +322,6 @@ var ReactUpdates = require('./ReactUpdates');

this._currentElement = element;
this._debugID = nextDebugID++;
if (process.env.NODE_ENV !== 'production') {
this._debugID = nextDebugID++;
}
};

@@ -351,4 +353,2 @@

this._debugID = nextDebugID++;
var displayName = element.type.displayName || element.type.name || 'Unknown';
ReactInstrumentation.debugTool.onSetDisplayName(this._debugID, displayName);
}

@@ -405,3 +405,3 @@

var instance = new ShallowComponentWrapper(element);
ReactReconciler.mountComponent(instance, transaction, null, null, context);
ReactReconciler.mountComponent(instance, transaction, null, null, context, 0);
this._instance = instance;

@@ -408,0 +408,0 @@ }

@@ -14,2 +14,2 @@ /**

module.exports = '15.3.0';
module.exports = '15.3.1-rc.1';

@@ -14,4 +14,2 @@ /**

var _prodInvariant = require('./reactProdInvariant');
var EventConstants = require('./EventConstants');

@@ -24,3 +22,2 @@ var EventPluginUtils = require('./EventPluginUtils');

var accumulate = require('./accumulate');
var invariant = require('fbjs/lib/invariant');
var keyOf = require('fbjs/lib/keyOf');

@@ -439,4 +436,8 @@

} else if (isEndish(topLevelType)) {
trackedTouchCount -= 1;
!(trackedTouchCount >= 0) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Ended a touch event which was not counted in trackedTouchCount.') : _prodInvariant('132') : void 0;
if (trackedTouchCount >= 0) {
trackedTouchCount -= 1;
} else {
console.error('Ended a touch event which was not counted in `trackedTouchCount`.');
return null;
}
}

@@ -443,0 +444,0 @@

@@ -489,2 +489,4 @@ /**

function getDictionaryKey(inst) {
// Prevents V8 performance issue:
// https://github.com/facebook/react/pull/7232
return '.' + inst._rootNodeID;

@@ -491,0 +493,0 @@ }

@@ -130,5 +130,12 @@ /**

event.stopPropagation();
} else {
} else if (typeof event.cancelBubble !== 'unknown') {
// eslint-disable-line valid-typeof
// The ChangeEventPlugin registers a "propertychange" event for
// IE. This event does not support bubbling or cancelling, and
// any references to cancelBubble throw "Member not found". A
// typeof check of "unknown" circumvents this issue (and is also
// IE specific).
event.cancelBubble = true;
}
this.isPropagationStopped = emptyFunction.thatReturnsTrue;

@@ -135,0 +142,0 @@ },

{
"name": "react",
"description": "React is a JavaScript library for building user interfaces.",
"version": "15.3.0",
"version": "15.3.1-rc.1",
"keywords": [

@@ -6,0 +6,0 @@ "react"

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc