mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-22 22:44:52 +00:00
[fix] top-level API exports
Also fixes importing these APIs from 'react-native' when used with the Babel plugin.
This commit is contained in:
@@ -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
@@ -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,
|
||||
|
||||
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user