React Native区分安卓/iOS平台

React Native的Platform模块可对平台和版本号进行判断。

import { Platform } from 'react-native';
class xxx extends Component {
    aaa = () = > {
      if(Platform.OS === 'android'){}
    }
}

差异的组件:


image.png

你可能感兴趣的:(React Native区分安卓/iOS平台)