react native get OS
const design = Platform.select({
android: {
header: true
},
ios: {
header: false
},
});
react native get OS
const design = Platform.select({
android: {
header: true
},
ios: {
header: false
},
});
react native detect platform
Platform.select({
ios: {
backgroundColor: 'red',
},
android: {
backgroundColor: 'blue',
},
})
how to use platform.select
import {Platform} from 'react-native';
st styles = StyleSheet.create({
container: {
flex: 1,
...Platform.select({
ios: {
backgroundColor: 'red',
},
android: {
backgroundColor: 'blue',
},
}),
},
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us