showing results for - "react native styles for both platforms"
Alex
21 Jul 2018
1import { Platform, StyleSheet } from 'react-native';
2
3const styles = StyleSheet.create({
4  container: {
5    flex: 1,
6    ...Platform.select({
7      ios: {
8        backgroundColor: 'red'
9      },
10      android: {
11        backgroundColor: 'green'
12      },
13      default: {
14        // other platforms, web for example
15        backgroundColor: 'blue'
16      }
17    })
18  }
19});
20
queries leading to this page
react native ios platformreact native platform specific stylesimport is platform base in react nativeplatform wise css react nativetest if ios react nativereact native check if andriod or iosreact native components android iosreact native os typereact native detect os versionhow to use platform os in react nativereact native check iosreact native detect ios or androidreadct native check if platform androidreact native is iosreact native platform specific codereact native get platformreact native platform specific importhow to specify a platform on react nativeget os react nativereact native platform compoenntreact native check platformreact native file extensionreact native android css onlyplatform specific code javascriptplatform specific style react nativereact native design stylesplatform specific components react nativehow to use platform select react nativeplatform os webreact native best way to stylereact native wen import platform specificreact native check android or iosreact native playform android jshow to check the platform reactstylesheet react native platformreact native new designed styles layouts examplesreact nativetest how to chnagen platform os to iosget platform react nativereact native check if androidis it best to have styles in react nativeplatform os web react native checkbest react native styling wayplatform version react nativecheck platform in react nativebest style framework for react nativereact native platformreferenceerror 3a platform is not defined react nativeplatform version in react jsdifferent style in platform react nativeplatform os specific device in react nativeplatform os 3d 3d 3d 22android 22only render if ios react nativeplatform os react native common jsreact native if ios or androidreact native get operating systemreact native check web platformdetecting platform react nativestyles in react native for all platformsreact native platform osreact native different styles for ios and androidplatform react nativereact native platform select 28 29import platform from react nativereact native platform selectios and android specific style react nativereact native is there a way to see what platform user is usingcheck platform android react nativeversion condition in ios os react nativeplatform os react nativeplatform for react nativereact native styles for whole appplatform react native systemversionplatform osplatform specific packages version react nativebest react native design libraryplatform os 3d 3d androidplaform specific codeplatform specific component react native definitionios react native stylenecessary to import platform in react nativestyling react native appsreact native platformreact native librariesplatfoem android react antiveplatform ios react nativerecat ntive platformimport 7b platform 7d from 22react native 22 3bplatform in react nativeplatform ios or android react nativerender based on platformplatform os 3d 3d iosplatform osimport platform from 27react native 27react native run code for platform specificreact native display platform os componentreact native import platformplatform os react nativeplatform os 3d 3d 3d 27web 27latform ios react nativereact native styles for both platformsreact native platform checkreact native device specific styleplatform style react nativetop react native layout 28platform os 3d 3d 3d 27ios 27 29react platform osplatform wbe os reactn ativeversion condition in ios react nativeplatform os react native not defindedreact native platform apiplatform react nativehow to use platform in react nativereact native detect oshow to use platform selectplatform os possible values react nativeplatform in reactnative platform selectreact native check oscheck platform react nativereact native identify iosplatform os in react nativeplatform select in treactreact native detect on androidplatform ioshow to write platform specific code in react native componenet propsplatform is not defined react native platform select worksreact native platform androidreact native styles for both platforms