Implement remove root view operations

Summary: This diff implements the removal of react root view inside fabric cxx implementation

Reviewed By: shergin

Differential Revision: D8939942

fbshipit-source-id: 69835b55c80e2970d65220d947489bc1af4b125d
This commit is contained in:
David Vacca 2018-08-15 17:49:49 -07:00 committed by Facebook Github Bot
parent 596f17efda
commit f9c86f05e9
2 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,11 @@ public interface UIManager extends JSIModule, PerformanceCounter {
*/
<T extends SizeMonitoringFrameLayout & MeasureSpecProvider> int addRootView(final T rootView);
/**
* Unregisters a new root view.
*/
void removeRootView(int reactRootTag);
/**
* Updates the layout specs of the RootShadowNode based on the Measure specs received by
* parameters.

View File

@ -547,6 +547,7 @@ public class FabricUIManager implements UIManager, JSHandler, FabricBinder {
}
public void removeRootView(int rootTag) {
mUIViewOperationQueue.enqueueRemoveRootView(rootTag);
mRootShadowNodeRegistry.removeNode(rootTag);
}