Check out example codes for "bootstrap dropdown going off page". It will help you in understanding the concepts better.

Code Example 1

<!--add  dropdown-menu-right class to the dropdown-menu -->
<div class="dropdown-menu dropdown-menu-right">

Learn ReactJs, React Native from akashmittal.com