Check out example codes for "Replaced OS is obselete". 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