[fix] top-level API exports

Also fixes importing these APIs from 'react-native' when used with the
Babel plugin.
This commit is contained in:
Nicolas Gallagher
2017-12-18 16:15:00 +00:00
parent f1ce6c2acb
commit 9bcc67e73a
4 changed files with 27 additions and 4 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
*/
import invariant from 'fbjs/lib/invariant';
import { unmountComponentAtNode } from 'react-dom';
import { unmountComponentAtNode } from '../../modules/unmountComponentAtNode';
import renderApplication, { getApplication } from './renderApplication';
import type { ComponentType } from 'react';
+2 -3
View File
@@ -2,7 +2,8 @@ import createElement from './modules/createElement';
import findNodeHandle from './modules/findNodeHandle';
import NativeModules from './modules/NativeModules';
import processColor from './modules/processColor';
import { hydrate, render, unmountComponentAtNode } from 'react-dom';
import render from './modules/render';
import unmountComponentAtNode from './modules/unmountComponentAtNode';
// APIs
import Animated from './apis/Animated';
@@ -63,7 +64,6 @@ import ViewPropTypes from './components/View/ViewPropTypes';
export {
// top-level API
findNodeHandle,
hydrate,
render,
unmountComponentAtNode,
// modules
@@ -128,7 +128,6 @@ export {
const ReactNative = {
// top-level API
findNodeHandle,
hydrate,
render,
unmountComponentAtNode,
+12
View File
@@ -0,0 +1,12 @@
/**
* Copyright (c) 2016-present, Nicolas Gallagher.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
*/
import { render } from 'react-dom';
export default render;
@@ -0,0 +1,12 @@
/**
* Copyright (c) 2016-present, Nicolas Gallagher.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
* @noflow
*/
import { unmountComponentAtNode } from 'react-dom';
export default unmountComponentAtNode;