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

Building the app container

The app container is going to provide a base NavigatorIOS route that renders our TasksList container. It looks similar to what we previously had in our root index files:

// TasksRedux/app/containers/AppContainer.ios.js 

import React, { Component } from 'react'; 
 
import { 
  NavigatorIOS, 
  StyleSheet 
} from 'react-native'; 
 
import TasksListContainer from '../containers/TasksListContainer'; 
 
export default class App extends Component { 
  render () { 
    return ( 
      <NavigatorIOS 
        initialRoute={{ 
          component: TasksListContainer, 
          title: 'Tasks' 
        }} 
        style={ styles.container } 
      /> 
    ) 
  } 
} 
 
const styles = StyleSheet.create({ 
  container: { 
    flex: 1, 
    backgroundColor: '#F5FCFF' 
  } 
}); 

The major difference between the AppContainer and the root index ...

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