Check out example codes for "android disable landscape mode". It will help you in understanding the concepts better.

Code Example 1

<activity android:name=".SomeActivity"
    android:label="@string/app_name"
    android:screenOrientation="portrait" />

Learn ReactJs, React Native from akashmittal.com