var React = require('react-native'); var { TabBarIOS, NavigatorIOS } = React; var App = React.createClass({ render: function() { return ( <TabBarIOS> <TabBarIOS.Item title="React Native" selected={true}> <NavigatorIOS initialRoute={{ title: 'React Native' }} /> </TabBarIOS.Item> </TabBarIOS> ); }, });
看着这奇怪的写法,顿时无爱了。javascript
总体思路和NativeScript基本一致,封装javascript引擎,提供组件api.java
相比这下,仍是感受NativeScript作得更“专业”一些。react