Skip to content
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
6 changes: 6 additions & 0 deletions packages/react-native-renderer/src/ReactFabric.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,13 @@ const ReactFabric: ReactFabricType = {
return getPublicRootInstance(root);
},

// Deprecated - this function is being renamed to stopSurface, use that instead.
// TODO (T47576999): Delete this once it's no longer called from native code.
unmountComponentAtNode(containerTag: number) {
this.stopSurface(containerTag);
},

stopSurface(containerTag: number) {
const root = roots.get(containerTag);
if (root) {
// TODO: Is it safe to reset this now or should I wait since this unmount could be deferred?
Expand Down
6 changes: 5 additions & 1 deletion scripts/rollup/shims/react-native/ReactFabric.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ if (__DEV__) {
ReactFabric = require('../implementations/ReactFabric-prod');
}

BatchedBridge.registerCallableModule('ReactFabric', ReactFabric);
if (global.RN$Bridgeless) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm assuming that this file gets synced over, too?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.

global.RN$stopSurface = ReactFabric.stopSurface;
} else {
BatchedBridge.registerCallableModule('ReactFabric', ReactFabric);
}

module.exports = (ReactFabric: ReactNativeType);