Reputation: 6972
Making an app to work on both android and ios. For the IOS version I want to use NavigatorIOS and for the android I want to use just Android.
How do I only use the correct navigator depending on the device? Thanks
Upvotes: 0
Views: 187
Reputation: 2715
You can get the Platform via the React Platform
module:
var Platform = require("react-native").Platform;
if (Platform.OS === "ios") { }
else if (Platform.OS === "android") { }
Upvotes: 1