Create binding for unmountComponentAtNode in bridgeless mode

Summary: Right now we register ReactFabric as a callable module with the bridge so that we can call `ReactFabric.unmountComponentAtNode` in `ReactInstanceManager.detachViewFromInstance`. In bridgeless mode we don't have callable modules, so I'm just setting a global variable that can be called from C++ instead. Using this in a new `unmount` method in FabricUIManager.

Reviewed By: shergin, mdvacca

Differential Revision: D16273720

fbshipit-source-id: 95edb16da6566113a58babda3ebdf0fc4e39f8b0
This commit is contained in:
Emily Janzer
2019-07-18 14:14:57 -07:00
committed by Facebook Github Bot
parent 18c0087d44
commit 305058178e
3 changed files with 21 additions and 4 deletions
@@ -182,6 +182,10 @@ public class FabricUIManager implements UIManager, LifecycleEventListener {
mEventDispatcher.dispatchAllEvents();
}
public void stopSurface(int surfaceID) {
mBinding.stopSurface(surfaceID);
}
@Override
public void initialize() {
mEventDispatcher.registerEventEmitter(FABRIC, new FabricEventEmitter(this));