KD Chang
iOS
Android
Hybrid
Write Once, Run Everywhere !
Write Once, Bug Everywhere !
Hybrid Mobile App
Mobile UI
JS Framework
Device Library
Database(Restful)
// 安裝 ionic, cordova, Node.js 4
$ npm install -g cordova ionic
// init project
$ ionic start myApp tabs
$ cd myApp
// add platform
$ ionic platform add ios
// build app
$ ionic build ios
// emulate, run app
$ ionic emulate ios
$ ionic run ios
1. Good community and ecosystem
2. Native UI component, Good performance!
3. Learn once, write everywhere!
4. Code reuse, from the Web
$ npm install -g react-native-cli
$ react-native init AwesomeProject
// iOS
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>
);
},
});
// Android
var React = require('react-native');
var { DrawerLayoutAndroid, ProgressBarAndroid } = React;
var App = React.createClass({
render: function() {
return (
<DrawerLayoutAndroid
renderNavigationView={() => <Text>React Native</Text>}>
<ProgressBarAndroid />
</DrawerLayoutAndroid>
);
},
});