Skip to content

(0 , _reactNative.TabNavigator) is not a function #812

@PhpGuyZim

Description

@PhpGuyZim

bug

While working through the example in docs, the first step/page (https://reactnavigation.org/docs/intro/) was perfect. Everything worked as advertised (I did have to import button and View which the example didn't)...but page 2 (https://reactnavigation.org/docs/intro/nesting) has got me stumped.

Why is TabNavigator giving that error? Do I need to import something I missed?
My code:

import React from 'react';
import {
	AppRegistry,
	Text,
	View,
	Button,
	TabNavigator
} from 'react-native';
import { StackNavigator } from 'react-navigation';

import Splash from './app/components/Splash';
import HomeScene from './app/components/HomeScene';
import SettingsScene from './app/components/SettingsScene'; 

const myapp = StackNavigator({
	Home: { screen: HomeScene },
	Settings: { screen: SettingsScene },
});     

const MainScreenNavigator = TabNavigator({
	home: { screen: HomeScene },
	settings: { screen: SettingsScene },
});

AppRegistry.registerComponent('myapp', () =>myapp);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions