Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RN] Remove unstable_batchedUpdates and unmountComponentAtNodeAndRemoveContainer from Fabric #12571

Merged
merged 1 commit into from
Apr 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions packages/react-native-renderer/src/ReactFabric.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @flow
*/

import type {ReactNativeType} from './ReactNativeTypes';
import type {ReactFabricType} from './ReactNativeTypes';
import type {ReactNodeList} from 'shared/ReactTypes';

import './ReactFabricInjection';
Expand All @@ -34,7 +34,7 @@ ReactGenericBatching.injection.injectRenderer(ReactFabricRenderer);

const roots = new Map();

const ReactFabric: ReactNativeType = {
const ReactFabric: ReactFabricType = {
NativeComponent: ReactNativeComponent,

findNodeHandle: findNumericNodeHandle,
Expand Down Expand Up @@ -63,10 +63,6 @@ const ReactFabric: ReactNativeType = {
}
},

unmountComponentAtNodeAndRemoveContainer(containerTag: number) {
ReactFabric.unmountComponentAtNode(containerTag);
},

createPortal(
children: ReactNodeList,
containerTag: number,
Expand All @@ -75,8 +71,6 @@ const ReactFabric: ReactNativeType = {
return ReactPortal.createPortal(children, containerTag, null, key);
},

unstable_batchedUpdates: ReactGenericBatching.batchedUpdates,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we at some point switch this to be the only ReactNative export, then we might need to add a noop with a warning here just for legacy purposes.


__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
// Used as a mixin in many createClass-based components
NativeMethodsMixin,
Expand Down
13 changes: 13 additions & 0 deletions packages/react-native-renderer/src/ReactNativeTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,16 @@ export type ReactNativeType = {

__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: SecretInternalsType,
};

export type ReactFabricType = {
NativeComponent: any,
findNodeHandle(componentOrHandle: any): ?number,
render(
element: React$Element<any>,
containerTag: any,
callback: ?Function,
): any,
unmountComponentAtNode(containerTag: number): any,

__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: SecretInternalsType,
};