addRootView

open fun <T : View?> addRootView(rootView: T): Int


open fun <T : View?> addRootView(rootView: T, initialProps: WritableMap): Int

Registers a new root view. JS can use the returned tag with manageChildren to add/remove children to this view.

Calling addRootView through UIManagerModule calls addRootView in the non-Fabric renderer, always. This is deprecated in favor of calling startSurface in Fabric, which must be done directly through the FabricUIManager.

Note that this must be called after getWidth()/getHeight() actually return something. See CatalystApplicationFragment as an example.

TODO(6242243): Make addRootView thread safe NB: this method is horribly not-thread-safe.