-
-
Save inchr/d0184f4ae91abd6036a2fa61725744c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Text } from 'react-native'; | |
class About extends Component { | |
render() { | |
return ( | |
<Text>About!</Text> | |
); | |
} | |
} | |
export default About; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Platform | |
} from 'react-native'; | |
import {Navigation} from 'react-native-navigation'; | |
import { registerScreens } from './screens'; | |
registerScreens(); // this is where you register all of your app's screens | |
// this will start our app | |
Navigation.startTabBasedApp({ | |
tabs: [{ | |
label: 'One', | |
screen: 'AwesomeProject.Home', // this is a registered name for a screen | |
icon: require('../img/one.png'), | |
selectedIcon: require('../img/one_selected.png'), // iOS only | |
title: 'Screen One' | |
}] | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Text } from 'react-native'; | |
class Home extends Component { | |
render() { | |
return ( | |
<Text>Home!</Text> | |
); | |
} | |
} | |
export default Home; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-unused-vars */ | |
import App from './src/app'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Navigation } from 'react-native-navigation'; | |
import Home from './containers/Home'; | |
import About from './containers/About'; | |
// register all screens of the app (including internal ones) | |
export function registerScreens() { | |
Navigation.registerComponent('AwesomeProject.Home', () => Home); | |
Navigation.registerComponent('AwesomeProject.About', () => About); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment