Guest User

Untitled

a guest
Nov 18th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. Invariant Violation: The navigation prop is missing for this navigator. In
  2. react-navigation 3 you must set up your app container directly. More info:
  3. https://reactnavigation.org/docs/en/app-containers.html
  4.  
  5. import React, {Component} from 'react';
  6. import { StyleSheet, Text, View } from 'react-native';
  7. import { createStackNavigator } from 'react-navigation';
  8.  
  9. import Login from './view/login.js'
  10. import SignUp from './view/signup.js'
  11.  
  12. const RootStack = createStackNavigator(
  13. {
  14. Home: {
  15. screen: Login
  16. },
  17. Signup: {
  18. screen: SignUp
  19. }
  20. },
  21. {
  22. initialRouteName: 'Home'
  23. }
  24.  
  25. );
  26.  
  27. export default class App extends React.Component {
  28. render() {
  29. return <RootStack />;
  30. }
  31. }
Add Comment
Please, Sign In to add comment