HackerTrans
TopNewTrendsCommentsPastAskShowJobs

brentvatne

no profile record

comments

brentvatne
·11 yıl önce·discuss
- You can determine the platform with React.Platform -- eg:

var React = require('react-native');

var { Platform } = React;

if (Platform.OS === 'ios') {

  // lol steve jobs
} else {

  // lol robutts
}

Android also has a `Version` property on `Platform`.

- Certain features are not idiomatic on both platforms: where you might use TabBar on iOS you are going to use a Drawer on Android. NavigatorIOS is a wrapper around UINavigationController that is not maintained as part of the core React Native project, but is a community effort -- nobody at Facebook uses it, and nobody who makes any serious apps with React Native use it either; instead, they use the cross-platform Navigator component, written entirely in JS. Similarly, if you really want to use a TabBar on Android, there exists at least one excellent JS implementations of this that you can use: https://github.com/exponentjs/react-native-tab-navigator

- This is still a very early release! In fact, it is the first day it is released. There are plans to bring the APIs together where it makes sense. For example, SwitchAndroid and SwitchIOS will be brought together under a Switch component that has the same API on both platforms but uses their underlying native implementations.
brentvatne
·11 yıl önce·discuss
`adb reverse tcp:8081 tcp:8081` works like a charm for me