React Native enables you to build world-class application experiences on native platforms using a consistent developer experience based on JavaScript and React. The focus of React Native is on developer efficiency across all the platforms you care about — learn once, write anywhere.
4. Define: Abstracted Platform
A platform where an API is abstracted away from or
separated from the primary language by proxy and/or
runtime.
EXPLORING REACT NATIVE
UIView
*
myView
=
[[UIView
alloc]
init];Obj c
React Native <View></View>
5. EXPLORING REACT NATIVE
React Native
Open Source ○
Licence BSD
iOS ○
Android ○
Windows No
Platform Quick Facts
Source: https://github.com/skypanther/mobileframeworks
8. platform Setup
EXPLORING REACT NATIVE
1. OS X - Only OS X is currently supported
2. Homebrew is the recommended way to install Watchman and Flow.
3. Install Node.js 4.0 or newer.
3.1.Install nvm. Then run nvm install node && nvm alias default node, which installs the latest version
of Node.js and sets up your terminal so you can run it by typing node. With nvm you can install
multiple versions of Node.js and easily switch between them.
4. brew install watchman. It is recommended that you install installing watchman, otherwise you might
hit a node file watching bug.
5. brew install flow, if you want to use flow.
Source: https://facebook.github.io/react-native/docs/getting-started.html
10. Create Todo App
EXPLORING REACT NATIVE
1. $ cd todomjs
2. Open ios/todomjs.xcodeproj and hit run in Xcode.
3. Open index.ios.js in your text editor of choice and edit some lines.
4. Hit ⌘-R in your iOS simulator to reload the app and see your change!
Source: https://facebook.github.io/react-native/docs/getting-started.html
$
npm
install
-‐g
react-‐native-‐cli
$
react-‐native
init
todomjs
20. Adding
Native Icons
EXPLORING REACT NATIVE
Source: https://github.com/corymsmith/react-native-icons
npm
install
react-‐native-‐icons@latest
-‐-‐save
•In XCode, in the project navigator right click Libraries ➜ Add Files to [your project's name]
•Go to node_modules ➜ react-native-icons➜ ios and add ReactNativeIcons.xcodeproj
•Add libReactNativeIcons.a (from 'Products' under ReactNativeIcons.xcodeproj) to your
project's Build Phases ➜ Link Binary With Libraries phase
•Add the font files you want to use into the Copy Bundle Resources build phase of your
project (click the '+' and click 'Add Other...' then choose the font files from node_modules/
react-native-icons/ios/ReactNativeIcons/Libraries/FontAwesomeKit).
•Run your project (Cmd+R)
38. Pros & CONS React Native
BUILDING NATIVE MOBILE APPS WITH JAVASCRIPT
‣ Best Feature: Live Reload
Pros Cons
Live Reload / No compile Time No JS Encryption
Growing Community Very Young
Completely Open Source ES6 Fluency is almost required
Expressive Markup React Methodology Learning Curve
Limited Cross-platform Apis