diff --git a/grunt/config/browserify.js b/grunt/config/browserify.js index e61fba9bc986f..9ac07bb71e233 100644 --- a/grunt/config/browserify.js +++ b/grunt/config/browserify.js @@ -19,7 +19,9 @@ var SECRET_INTERNALS_NAME = 'React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_ var shimSharedModules = globalShim.configure({ './ReactCurrentOwner': SECRET_INTERNALS_NAME + '.ReactCurrentOwner', './ReactComponentTreeHook': SECRET_INTERNALS_NAME + '.ReactComponentTreeHook', - // All these methods are shared are exposed. + // The methods we used here are exposed on the main React export. + // TODO: Change all renderer code to require the isomorphic React directly + // instead of these internals. './ReactElement': 'React', './ReactPropTypes': 'React.PropTypes', './ReactChildren': 'React.Children', @@ -27,7 +29,7 @@ var shimSharedModules = globalShim.configure({ var shimDOMModules = aliasify.configure({ 'aliases': { - './ReactAddonsDOMDependencies': './build/modules/ReactAddonsDOMDependenciesUMDShim.js', + './ReactAddonsDOMDependencies': {relative: './ReactAddonsDOMDependenciesUMDShim'}, }, }); diff --git a/src/renderers/dom/client/ReactMount.js b/src/renderers/dom/client/ReactMount.js index af0a9cd57ba94..c33dee098ca7a 100644 --- a/src/renderers/dom/client/ReactMount.js +++ b/src/renderers/dom/client/ReactMount.js @@ -237,6 +237,7 @@ if (__DEV__) { TopLevelWrapper.prototype.render = function() { return this.props.child; }; +TopLevelWrapper.isReactTopLevelWrapper = true; /** * Mounting is the process of initializing a React component by creating its diff --git a/src/renderers/shared/stack/reconciler/ReactUpdates.js b/src/renderers/shared/stack/reconciler/ReactUpdates.js index ea2235aa00377..f1fdb05e1fc83 100644 --- a/src/renderers/shared/stack/reconciler/ReactUpdates.js +++ b/src/renderers/shared/stack/reconciler/ReactUpdates.js @@ -160,10 +160,7 @@ function runBatchedUpdates(transaction) { if (ReactFeatureFlags.logTopLevelRenders) { var namedComponent = component; // Duck type TopLevelWrapper. This is probably always true. - if ( - component._currentElement.props.child === - component._renderedComponent._currentElement - ) { + if (component._currentElement.type.isReactTopLevelWrapper) { namedComponent = component._renderedComponent; } markerName = 'React update: ' + namedComponent.getName();