O'Reilly logo

React Native By Example by Richard Kho

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

App.js and index.ios.js

App.js will serve as the initial route for our app's navigation. It will handle the logic that decides whether to show the current month's expenses or a prompt to enter a budget for the month.

The root index.ios.js file will be modified in the same way as we structured it in the first project of this book, Tasks:

// Expenses/index.ios.js import React, { Component } from 'react'; import {   AppRegistry,   NavigatorIOS,   StyleSheet } from 'react-native';  import App from './app/App';  export default class Expenses extends Component {   render() {     return (       <NavigatorIOS         initialRoute={{           component: App,           title: 'Expenses'         }}         style={ styles.container }       />     );   } }  const styles = StyleSheet.create({   container: { 

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required