The ExternalComponent layout allows you to display any native view as a screen. To use the External Component we'll need to register it with a string name. This name is then used when declaring layouts in JS.
When it comes to implementing an external component on Android, you have two choices. We recommend you use a base class extending
View. If you're required to use Fragments, you'll find an basic example below.
Using a Fragment as an external component is done by attaching the Fragment to a FrameLayout, and returning the FrameLayout from the
asView() method of the ExternalComponent.
Once you've registered the external component in native, you can use it in your layout declarations. For example, to show an external component modally:
props passed to external components are sent over the bridge and therefore must be serializable.