From c7771ac64f9423a0e696642eac866225d4242931 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Sun, 5 Feb 2017 16:36:26 -0800 Subject: [PATCH] [change] avoid 'react-dom/lib/*' where possible --- src/apis/AppRegistry/index.js | 2 +- src/core.js | 5 +---- src/index.js | 5 +---- src/modules/findNodeHandle/index.js | 4 ++-- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/apis/AppRegistry/index.js b/src/apis/AppRegistry/index.js index f8fe8a9e..fe79ee28 100644 --- a/src/apis/AppRegistry/index.js +++ b/src/apis/AppRegistry/index.js @@ -8,7 +8,7 @@ import { Component } from 'react'; import invariant from 'fbjs/lib/invariant'; -import { unmountComponentAtNode } from 'react-dom/lib/ReactMount'; +import { unmountComponentAtNode } from 'react-dom'; import renderApplication, { getApplication } from './renderApplication'; const emptyObject = {}; diff --git a/src/core.js b/src/core.js index a12779d9..6d4a0c28 100644 --- a/src/core.js +++ b/src/core.js @@ -1,8 +1,5 @@ import findNodeHandle from './modules/findNodeHandle'; -import ReactDefaultInjection from 'react-dom/lib/ReactDefaultInjection'; -import { render, unmountComponentAtNode } from 'react-dom/lib/ReactMount'; - -ReactDefaultInjection.inject(); +import { render, unmountComponentAtNode } from 'react-dom'; // APIs import I18nManager from './apis/I18nManager'; diff --git a/src/index.js b/src/index.js index 60a371c9..bfb5b6ae 100644 --- a/src/index.js +++ b/src/index.js @@ -1,8 +1,5 @@ import findNodeHandle from './modules/findNodeHandle'; -import ReactDefaultInjection from 'react-dom/lib/ReactDefaultInjection'; -import { render, unmountComponentAtNode } from 'react-dom/lib/ReactMount'; - -ReactDefaultInjection.inject(); +import { render, unmountComponentAtNode } from 'react-dom'; // APIs import Animated from './apis/Animated'; diff --git a/src/modules/findNodeHandle/index.js b/src/modules/findNodeHandle/index.js index 3f081b6a..2968f86b 100644 --- a/src/modules/findNodeHandle/index.js +++ b/src/modules/findNodeHandle/index.js @@ -1,2 +1,2 @@ -import findNodeHandle from 'react-dom/lib/findDOMNode'; -export default findNodeHandle; +import { findDOMNode } from 'react-dom'; +export default findDOMNode;