Check out example codes for "xamarin check if ios or android". It will help you in understanding the concepts better.
Code Example 1
if(Device.RuntimePlatform == Device.iOS)
{
//iOS stuff
}
else if(Device.RuntimePlatform == Device.Android)
{
//Android stuff
}
Learn ReactJs, React Native from akashmittal.com