Answers for "how to check platform in react native"

0

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',
          },
        }),
      },
    });
Posted by: Guest on October-13-2020
0

react native detect platform

Platform.select({
	ios: {
		backgroundColor: 'red',
	},
	android: {
		backgroundColor: 'blue',
	},
})
Posted by: Guest on March-06-2021

Code answers related to "how to check platform in react native"

Code answers related to "Javascript"

Browse Popular Code Answers by Language