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

Android-specific app component

Next, I created an Android-specific version of App.js, renaming the original App.ios.js. Only two components are imported to App.android.js because any components being navigated to are handled in the root index.android.js file:

// Expenses/app/App.android.js 

import React, { Component } from 'react'; 
 
import { 
  Text, 
  View 
} from 'react-native'; 
 
import styles from './styles'; 
 
import * as dateMethods from './utils/dateMethods'; 
import * as storageMethods from './utils/storageMethods'; 
 
import AddExpenses from './components/AddExpenses'; 
import CurrentMonthExpenses from './components/CurrentMonthExpenses'; 

The state of the App component does not need a selectedTab property since we are not using tabbed navigation ...

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