mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-02 10:35:54 +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 invariant from 'fbjs/lib/invariant';
|
||||||
import { unmountComponentAtNode } from 'react-dom';
|
import { unmountComponentAtNode } from '../../modules/unmountComponentAtNode';
|
||||||
import renderApplication, { getApplication } from './renderApplication';
|
import renderApplication, { getApplication } from './renderApplication';
|
||||||
import type { ComponentType } from 'react';
|
import type { ComponentType } from 'react';
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -2,7 +2,8 @@ import createElement from './modules/createElement';
|
|||||||
import findNodeHandle from './modules/findNodeHandle';
|
import findNodeHandle from './modules/findNodeHandle';
|
||||||
import NativeModules from './modules/NativeModules';
|
import NativeModules from './modules/NativeModules';
|
||||||
import processColor from './modules/processColor';
|
import processColor from './modules/processColor';
|
||||||
import { hydrate, render, unmountComponentAtNode } from 'react-dom';
|
import render from './modules/render';
|
||||||
|
import unmountComponentAtNode from './modules/unmountComponentAtNode';
|
||||||
|
|
||||||
// APIs
|
// APIs
|
||||||
import Animated from './apis/Animated';
|
import Animated from './apis/Animated';
|
||||||
@@ -63,7 +64,6 @@ import ViewPropTypes from './components/View/ViewPropTypes';
|
|||||||
export {
|
export {
|
||||||
// top-level API
|
// top-level API
|
||||||
findNodeHandle,
|
findNodeHandle,
|
||||||
hydrate,
|
|
||||||
render,
|
render,
|
||||||
unmountComponentAtNode,
|
unmountComponentAtNode,
|
||||||
// modules
|
// modules
|
||||||
@@ -128,7 +128,6 @@ export {
|
|||||||
const ReactNative = {
|
const ReactNative = {
|
||||||
// top-level API
|
// top-level API
|
||||||
findNodeHandle,
|
findNodeHandle,
|
||||||
hydrate,
|
|
||||||
render,
|
render,
|
||||||
unmountComponentAtNode,
|
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