Facebook just release React Native for iOS, it is really a good news for React-fans. Powered by Javascript, it is the way to build native apps using React.js for user interface, no necessary to write native code.

What has been inspired?

  • Native components with Javascript
  • Easy to extend with custom native views and modules
  • Javascript version of CSS-layout with flexbox
  • Live uploads in iOS simulator

Quick setup

brew install node
brew install --HEAD watchman
brew install flow
npm install -g react-native-cli

flow is a library to check Javascript static type.

react-native-cli is a command line tool to build React native apps. After it installed, just use the following command to start a basic react native app.

react-native init your-app-name

After generate the app, go to your-app-name folder and open your-app-name.xcodeproj to open the project in xcode. Run cmd+R to start/restart the app in your iOS simulator. Then you can see a welcome page there.

The main file to load any view or data change is in index.ios.js

See the AwesomeProject demo followed by the tutorial at React Native