diff --git a/src/renderers/native/ReactNative/ReactNativeBaseComponent.js b/src/renderers/native/ReactNative/ReactNativeBaseComponent.js index b879b45b6a51a..7afe4da4370d6 100644 --- a/src/renderers/native/ReactNative/ReactNativeBaseComponent.js +++ b/src/renderers/native/ReactNative/ReactNativeBaseComponent.js @@ -56,10 +56,6 @@ ReactNativeBaseComponent.Mixin = { return this; }, - construct: function(element) { - this._currentElement = element; - }, - unmountComponent: function() { deleteAllListeners(this._rootNodeID); this.unmountChildren(); @@ -174,6 +170,15 @@ ReactNativeBaseComponent.Mixin = { } }, + /** + * Currently this still uses IDs for reconciliation so this can return null. + * + * @return {null} Null. + */ + getNativeNode: function() { + return null; + }, + /** * @param {string} rootID Root ID of this subtree. * @param {Transaction} transaction For creating/updating. diff --git a/src/renderers/native/ReactNative/ReactNativeDefaultInjection.js b/src/renderers/native/ReactNative/ReactNativeDefaultInjection.js index ee97c2560e61a..7096eaff3eb7a 100644 --- a/src/renderers/native/ReactNative/ReactNativeDefaultInjection.js +++ b/src/renderers/native/ReactNative/ReactNativeDefaultInjection.js @@ -27,13 +27,12 @@ var ReactElement = require('ReactElement'); var ReactComponentEnvironment = require('ReactComponentEnvironment'); var ReactDefaultBatchingStrategy = require('ReactDefaultBatchingStrategy'); var ReactEmptyComponent = require('ReactEmptyComponent'); -var ReactInstanceHandles = require('ReactInstanceHandles'); var ReactNativeComponentEnvironment = require('ReactNativeComponentEnvironment'); var ReactNativeGlobalInteractionHandler = require('ReactNativeGlobalInteractionHandler'); var ReactNativeGlobalResponderHandler = require('ReactNativeGlobalResponderHandler'); -var ReactNativeMount = require('ReactNativeMount'); var ReactNativeTextComponent = require('ReactNativeTextComponent'); var ReactNativeComponent = require('ReactNativeComponent'); +var ReactSimpleEmptyComponent = require('ReactSimpleEmptyComponent'); var ReactUpdates = require('ReactUpdates'); var ResponderEventPlugin = require('ResponderEventPlugin'); var UniversalWorkerNodeHandle = require('UniversalWorkerNodeHandle'); @@ -50,7 +49,6 @@ function inject() { * Inject module for resolving DOM hierarchy and plugin ordering. */ EventPluginHub.injection.injectEventPluginOrder(IOSDefaultEventPluginOrder); - EventPluginHub.injection.injectInstanceHandle(ReactInstanceHandles); ResponderEventPlugin.injection.injectGlobalResponderHandler( ReactNativeGlobalResponderHandler @@ -81,17 +79,19 @@ function inject() { ReactNativeComponentEnvironment ); - var EmptyComponent = () => { + var EmptyComponent = (instantiate) => { // Can't import View at the top because it depends on React to make its composite var View = require('View'); - return ReactElement.createElement(View, { - collapsable: true, - style: { position: 'absolute' } - }); + return new ReactSimpleEmptyComponent( + ReactElement.createElement(View, { + collapsable: true, + style: { position: 'absolute' } + }), + instantiate + ); }; - ReactEmptyComponent.injection.injectEmptyComponent(EmptyComponent); - EventPluginUtils.injection.injectMount(ReactNativeMount); + ReactEmptyComponent.injection.injectEmptyComponentFactory(EmptyComponent); ReactNativeComponent.injection.injectTextComponentClass( ReactNativeTextComponent diff --git a/src/renderers/native/ReactNative/ReactNativeEventEmitter.js b/src/renderers/native/ReactNative/ReactNativeEventEmitter.js index c7680257aff57..7c29a512b3cc4 100644 --- a/src/renderers/native/ReactNative/ReactNativeEventEmitter.js +++ b/src/renderers/native/ReactNative/ReactNativeEventEmitter.js @@ -12,6 +12,7 @@ 'use strict'; var EventPluginHub = require('EventPluginHub'); +var EventPluginRegistry = require('EventPluginRegistry'); var ReactEventEmitterMixin = require('ReactEventEmitterMixin'); var ReactNativeTagHandles = require('ReactNativeTagHandles'); var NodeHandle = require('NodeHandle'); @@ -91,7 +92,7 @@ var removeTouchesAtIndices = function( */ var ReactNativeEventEmitter = merge(ReactEventEmitterMixin, { - registrationNames: EventPluginHub.registrationNameModules, + registrationNames: EventPluginRegistry.registrationNameModules, putListener: EventPluginHub.putListener, diff --git a/src/renderers/native/ReactNative/createReactNativeComponentClass.js b/src/renderers/native/ReactNative/createReactNativeComponentClass.js index 199e268891a0d..9a8250fbead18 100644 --- a/src/renderers/native/ReactNative/createReactNativeComponentClass.js +++ b/src/renderers/native/ReactNative/createReactNativeComponentClass.js @@ -30,6 +30,7 @@ var createReactNativeComponentClass = function( ): ReactClass { var Constructor = function(element) { this._currentElement = element; + this._topLevelWrapper = null; this._rootNodeID = null; this._renderedChildren = null;