Last active
May 31, 2019 08:56
-
-
Save anchetaWern/ed147f64f88e95b41722cd1ed48c7ff2 to your computer and use it in GitHub Desktop.
React Native Stream Group Chat Tutorial: Initialize routes
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
// Root.js | |
import React, { Component } from 'react'; | |
import { YellowBox } from 'react-native'; | |
import { createStackNavigator, createAppContainer } from 'react-navigation'; | |
import Login from './src/screens/Login'; | |
import Chat from './src/screens/Chat'; | |
YellowBox.ignoreWarnings(["Setting a timer"]); | |
const RootStack = createStackNavigator( | |
{ | |
Login, | |
Chat | |
}, | |
{ | |
initialRouteName: "Login" | |
} | |
); | |
const AppContainer = createAppContainer(RootStack); | |
class Router extends Component { | |
render() { | |
return <AppContainer />; | |
} | |
} | |
export default Router; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment