Reputation: 848
So I upgraded my react-native to 0.57.3 and then launch the app in android. But the previous SegmentedControlIOS is replace with this error message. Does it mean my android sdk version is too high and I can no longer use this component?
Upvotes: 0
Views: 405
Reputation: 4409
SegmentedControlIOS
in react-native
is only developed for iOS platform
by Facebook
.
So this component will not available for Android.
You can differentiate the platform specific components by Platform
in react-native
.
import {Platform, StyleSheet} from 'react-native';
const Component = Platform.select({
ios: () => require('ComponentIOS'),
android: () => require('ComponentAndroid'),
})();
<Component />;
If you want use SegmentControl
for both iOS
and android
please go for react-native-segmented-control-tab
npm install react-native-segmented-control-tab --save
Please visit https://github.com/kirankalyan5/react-native-segmented-control-tab
Android
iOS:
Upvotes: 1