getting undefined is not a function (evaluating '(0,_reactNavigation.stacknavigator)') in drawer navigation
In my application I need drawer navigation, for that I am using sample code from this. I have integrated everything in my application, but getting the following error
undefined is not a function (evaluating
'(0,_reactNavigation.stacknavigator)')
And installed this one too.
npm install react-navigation --save
But don't know why this error is coming, So please guide me how to resolve this.
This is my app.js
import React, { Component } from 'react';
import { StyleSheet , Platform , View , Text , Image ,
TouchableOpacity , YellowBox } from 'react-native';
import { DrawerNavigator, StackNavigator } from 'react-navigation';
class NavigationDrawerStructure extends Component {
//Structure for the navigatin Drawer
toggleDrawer = () => {
//Props to open/close the drawer
this.props.navigationProps.toggleDrawer();
};
render() {
return (
<View style={{ flexDirection: 'row' }}>
<TouchableOpacity onPress={this.toggleDrawer.bind(this)}>
{/*Donute Button Image */}
<Image
source={require('./image/drawer.png')}
style={{ width: 25, height: 25, marginLeft: 5 }}
/>
</TouchableOpacity>
</View>
);
}
}
class Screen1 extends Component {
//Screen1 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 1 </Text>
</View>
);
}
}
class Screen2 extends Component {
//Screen2 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 2 </Text>
</View>
);
}
}
class Screen3 extends Component {
//Screen3 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 3 </Text>
</View>
);
}
}
const FirstActivity_StackNavigator = StackNavigator({
//All the screen from the Screen1 will be indexed here
First: {
screen: Screen1,
navigationOptions: ({ navigation }) => ({
title: 'Screen1',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});
const Screen2_StackNavigator = StackNavigator({
//All the screen from the Screen2 will be indexed here
Second: {
screen: Screen2,
navigationOptions: ({ navigation }) => ({
title: 'Screen2',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});
const Screen3_StackNavigator = StackNavigator({
//All the screen from the Screen3 will be indexed here
Third: {
screen: Screen3,
navigationOptions: ({ navigation }) => ({
title: 'Screen3',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});
const DrawerNavigatorExample = DrawerNavigator({
//Drawer Optons and indexing
Screen1: { //Title
screen: FirstActivity_StackNavigator,
},
Screen2: {//Title
screen: Screen2_StackNavigator,
},
Screen3: {//Title
screen: Screen3_StackNavigator,
},
});
export default DrawerNavigatorExample;
const styles = StyleSheet.create({
MainContainer: {
flex: 1,
paddingTop: 20,
alignItems: 'center',
marginTop: 50,
justifyContent: 'center',
},
});
And this is package.json
{
"name": "DrawerNavigation",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.1",
"react-native": "0.57.5",
"react-native-vector-icons": "^6.1.0",
"react-navigation": "^3.0.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.49.2",
"react-test-renderer": "16.6.1"
},
"jest": {
"preset": "react-native"
}
}
If I follow bellow sample also getting same error.
https://medium.com/@mehulmistri/drawer-navigation-with-custom-side-menu-react-native-fbd5680060ba
Anybody can help please
react-native navigation-drawer stack-navigator
add a comment |
In my application I need drawer navigation, for that I am using sample code from this. I have integrated everything in my application, but getting the following error
undefined is not a function (evaluating
'(0,_reactNavigation.stacknavigator)')
And installed this one too.
npm install react-navigation --save
But don't know why this error is coming, So please guide me how to resolve this.
This is my app.js
import React, { Component } from 'react';
import { StyleSheet , Platform , View , Text , Image ,
TouchableOpacity , YellowBox } from 'react-native';
import { DrawerNavigator, StackNavigator } from 'react-navigation';
class NavigationDrawerStructure extends Component {
//Structure for the navigatin Drawer
toggleDrawer = () => {
//Props to open/close the drawer
this.props.navigationProps.toggleDrawer();
};
render() {
return (
<View style={{ flexDirection: 'row' }}>
<TouchableOpacity onPress={this.toggleDrawer.bind(this)}>
{/*Donute Button Image */}
<Image
source={require('./image/drawer.png')}
style={{ width: 25, height: 25, marginLeft: 5 }}
/>
</TouchableOpacity>
</View>
);
}
}
class Screen1 extends Component {
//Screen1 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 1 </Text>
</View>
);
}
}
class Screen2 extends Component {
//Screen2 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 2 </Text>
</View>
);
}
}
class Screen3 extends Component {
//Screen3 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 3 </Text>
</View>
);
}
}
const FirstActivity_StackNavigator = StackNavigator({
//All the screen from the Screen1 will be indexed here
First: {
screen: Screen1,
navigationOptions: ({ navigation }) => ({
title: 'Screen1',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});
const Screen2_StackNavigator = StackNavigator({
//All the screen from the Screen2 will be indexed here
Second: {
screen: Screen2,
navigationOptions: ({ navigation }) => ({
title: 'Screen2',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});
const Screen3_StackNavigator = StackNavigator({
//All the screen from the Screen3 will be indexed here
Third: {
screen: Screen3,
navigationOptions: ({ navigation }) => ({
title: 'Screen3',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});
const DrawerNavigatorExample = DrawerNavigator({
//Drawer Optons and indexing
Screen1: { //Title
screen: FirstActivity_StackNavigator,
},
Screen2: {//Title
screen: Screen2_StackNavigator,
},
Screen3: {//Title
screen: Screen3_StackNavigator,
},
});
export default DrawerNavigatorExample;
const styles = StyleSheet.create({
MainContainer: {
flex: 1,
paddingTop: 20,
alignItems: 'center',
marginTop: 50,
justifyContent: 'center',
},
});
And this is package.json
{
"name": "DrawerNavigation",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.1",
"react-native": "0.57.5",
"react-native-vector-icons": "^6.1.0",
"react-navigation": "^3.0.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.49.2",
"react-test-renderer": "16.6.1"
},
"jest": {
"preset": "react-native"
}
}
If I follow bellow sample also getting same error.
https://medium.com/@mehulmistri/drawer-navigation-with-custom-side-menu-react-native-fbd5680060ba
Anybody can help please
react-native navigation-drawer stack-navigator
How can we help without inspecting your code? So please be more elaborate on asking question.
– Samitha Nanayakkara
Nov 20 at 8:21
replace stacknavigator by StackNavigator or createStackNavigator, capitalization matters!
– Steve Nosse
Nov 20 at 9:43
add a comment |
In my application I need drawer navigation, for that I am using sample code from this. I have integrated everything in my application, but getting the following error
undefined is not a function (evaluating
'(0,_reactNavigation.stacknavigator)')
And installed this one too.
npm install react-navigation --save
But don't know why this error is coming, So please guide me how to resolve this.
This is my app.js
import React, { Component } from 'react';
import { StyleSheet , Platform , View , Text , Image ,
TouchableOpacity , YellowBox } from 'react-native';
import { DrawerNavigator, StackNavigator } from 'react-navigation';
class NavigationDrawerStructure extends Component {
//Structure for the navigatin Drawer
toggleDrawer = () => {
//Props to open/close the drawer
this.props.navigationProps.toggleDrawer();
};
render() {
return (
<View style={{ flexDirection: 'row' }}>
<TouchableOpacity onPress={this.toggleDrawer.bind(this)}>
{/*Donute Button Image */}
<Image
source={require('./image/drawer.png')}
style={{ width: 25, height: 25, marginLeft: 5 }}
/>
</TouchableOpacity>
</View>
);
}
}
class Screen1 extends Component {
//Screen1 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 1 </Text>
</View>
);
}
}
class Screen2 extends Component {
//Screen2 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 2 </Text>
</View>
);
}
}
class Screen3 extends Component {
//Screen3 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 3 </Text>
</View>
);
}
}
const FirstActivity_StackNavigator = StackNavigator({
//All the screen from the Screen1 will be indexed here
First: {
screen: Screen1,
navigationOptions: ({ navigation }) => ({
title: 'Screen1',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});
const Screen2_StackNavigator = StackNavigator({
//All the screen from the Screen2 will be indexed here
Second: {
screen: Screen2,
navigationOptions: ({ navigation }) => ({
title: 'Screen2',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});
const Screen3_StackNavigator = StackNavigator({
//All the screen from the Screen3 will be indexed here
Third: {
screen: Screen3,
navigationOptions: ({ navigation }) => ({
title: 'Screen3',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});
const DrawerNavigatorExample = DrawerNavigator({
//Drawer Optons and indexing
Screen1: { //Title
screen: FirstActivity_StackNavigator,
},
Screen2: {//Title
screen: Screen2_StackNavigator,
},
Screen3: {//Title
screen: Screen3_StackNavigator,
},
});
export default DrawerNavigatorExample;
const styles = StyleSheet.create({
MainContainer: {
flex: 1,
paddingTop: 20,
alignItems: 'center',
marginTop: 50,
justifyContent: 'center',
},
});
And this is package.json
{
"name": "DrawerNavigation",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.1",
"react-native": "0.57.5",
"react-native-vector-icons": "^6.1.0",
"react-navigation": "^3.0.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.49.2",
"react-test-renderer": "16.6.1"
},
"jest": {
"preset": "react-native"
}
}
If I follow bellow sample also getting same error.
https://medium.com/@mehulmistri/drawer-navigation-with-custom-side-menu-react-native-fbd5680060ba
Anybody can help please
react-native navigation-drawer stack-navigator
In my application I need drawer navigation, for that I am using sample code from this. I have integrated everything in my application, but getting the following error
undefined is not a function (evaluating
'(0,_reactNavigation.stacknavigator)')
And installed this one too.
npm install react-navigation --save
But don't know why this error is coming, So please guide me how to resolve this.
This is my app.js
import React, { Component } from 'react';
import { StyleSheet , Platform , View , Text , Image ,
TouchableOpacity , YellowBox } from 'react-native';
import { DrawerNavigator, StackNavigator } from 'react-navigation';
class NavigationDrawerStructure extends Component {
//Structure for the navigatin Drawer
toggleDrawer = () => {
//Props to open/close the drawer
this.props.navigationProps.toggleDrawer();
};
render() {
return (
<View style={{ flexDirection: 'row' }}>
<TouchableOpacity onPress={this.toggleDrawer.bind(this)}>
{/*Donute Button Image */}
<Image
source={require('./image/drawer.png')}
style={{ width: 25, height: 25, marginLeft: 5 }}
/>
</TouchableOpacity>
</View>
);
}
}
class Screen1 extends Component {
//Screen1 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 1 </Text>
</View>
);
}
}
class Screen2 extends Component {
//Screen2 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 2 </Text>
</View>
);
}
}
class Screen3 extends Component {
//Screen3 Component
render() {
return (
<View style={styles.MainContainer}>
<Text style={{ fontSize: 23 }}> Screen 3 </Text>
</View>
);
}
}
const FirstActivity_StackNavigator = StackNavigator({
//All the screen from the Screen1 will be indexed here
First: {
screen: Screen1,
navigationOptions: ({ navigation }) => ({
title: 'Screen1',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});
const Screen2_StackNavigator = StackNavigator({
//All the screen from the Screen2 will be indexed here
Second: {
screen: Screen2,
navigationOptions: ({ navigation }) => ({
title: 'Screen2',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});
const Screen3_StackNavigator = StackNavigator({
//All the screen from the Screen3 will be indexed here
Third: {
screen: Screen3,
navigationOptions: ({ navigation }) => ({
title: 'Screen3',
headerLeft: <NavigationDrawerStructure navigationProps={navigation} />,
headerStyle: {
backgroundColor: '#FF9800',
},
headerTintColor: '#fff',
}),
},
});
const DrawerNavigatorExample = DrawerNavigator({
//Drawer Optons and indexing
Screen1: { //Title
screen: FirstActivity_StackNavigator,
},
Screen2: {//Title
screen: Screen2_StackNavigator,
},
Screen3: {//Title
screen: Screen3_StackNavigator,
},
});
export default DrawerNavigatorExample;
const styles = StyleSheet.create({
MainContainer: {
flex: 1,
paddingTop: 20,
alignItems: 'center',
marginTop: 50,
justifyContent: 'center',
},
});
And this is package.json
{
"name": "DrawerNavigation",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.1",
"react-native": "0.57.5",
"react-native-vector-icons": "^6.1.0",
"react-navigation": "^3.0.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.49.2",
"react-test-renderer": "16.6.1"
},
"jest": {
"preset": "react-native"
}
}
If I follow bellow sample also getting same error.
https://medium.com/@mehulmistri/drawer-navigation-with-custom-side-menu-react-native-fbd5680060ba
Anybody can help please
react-native navigation-drawer stack-navigator
react-native navigation-drawer stack-navigator
edited Nov 20 at 14:25
asked Nov 20 at 7:53
rams
51441229
51441229
How can we help without inspecting your code? So please be more elaborate on asking question.
– Samitha Nanayakkara
Nov 20 at 8:21
replace stacknavigator by StackNavigator or createStackNavigator, capitalization matters!
– Steve Nosse
Nov 20 at 9:43
add a comment |
How can we help without inspecting your code? So please be more elaborate on asking question.
– Samitha Nanayakkara
Nov 20 at 8:21
replace stacknavigator by StackNavigator or createStackNavigator, capitalization matters!
– Steve Nosse
Nov 20 at 9:43
How can we help without inspecting your code? So please be more elaborate on asking question.
– Samitha Nanayakkara
Nov 20 at 8:21
How can we help without inspecting your code? So please be more elaborate on asking question.
– Samitha Nanayakkara
Nov 20 at 8:21
replace stacknavigator by StackNavigator or createStackNavigator, capitalization matters!
– Steve Nosse
Nov 20 at 9:43
replace stacknavigator by StackNavigator or createStackNavigator, capitalization matters!
– Steve Nosse
Nov 20 at 9:43
add a comment |
6 Answers
6
active
oldest
votes
Use createStackNavigator instead of stackNavigator.
add a comment |
Replace this Code :
import { createDrawerNavigator, createStackNavigator } from 'react-navigation';
With this import of your project :
import { DrawerNavigator, StackNavigator } from 'react-navigation';
i hope this help you !
here I am using StackNavigator,If I changed above getting can't find variable: StackNavigator
– rams
Nov 20 at 14:07
check your code and see where you use StackNavigator and replace it with createStackNavigator im not sure but should help
– MoHammaD ReZa DehGhani
Nov 20 at 14:10
not working getting undefined is not an object
– rams
Nov 20 at 14:19
ok did you linked your dependency ? like this : react-native link and : react-native link react-navigation
– MoHammaD ReZa DehGhani
Nov 20 at 14:22
1
check app.json file above
– rams
Nov 20 at 14:27
|
show 7 more comments
This issue can be for haven't installed Android SDK platform 25 Do this :
- Open Android Studio
- Open SDK Manager
- Click SDK Platforms Tab
- Select android 7.1.1 (Nougat) API level is 25
- Apply
After installing that press OK and try again to build the project.
add a comment |
you could have a look at this example code here:
https://snack.expo.io/@eriveltonelias/stack-actions
I think the problem is :
- with stackNavigator, you should use createStackNavigator
(https://reactnavigation.org/docs/en/stack-navigator.html)
and - instead of drawerNavigator use createDrawerNavigator (https://reactnavigation.org/docs/en/drawer-navigator.html)
add a comment |
I stumbled upon this because I was experiencing the same error message. Besides createStackNavigator
as opposed to StackNavigator
. The issue was that I upgraded to 3.x and, new in 3 is createAppContainer
.
Now, instead of
export default DrawerNavigatorExample;
you need to have
export default createAppContainer(DrawerNavigatorExample)
Hope this saves someone else the hour I spent researching this :/
link to docs
add a comment |
in package.json edit react-navigation to '^2.17.0' NEXT restart your pc
Can you explain how this wlll solve the problem?
– Nick
Dec 21 at 8:22
i try,and its works
– Dzuhri Andika
Dec 26 at 7:58
another solutions, downgrade react-navigation to version 2.17.0
– Dzuhri Andika
Dec 26 at 7:59
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53388478%2fgetting-undefined-is-not-a-function-evaluating-0-reactnavigation-stacknaviga%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
Use createStackNavigator instead of stackNavigator.
add a comment |
Use createStackNavigator instead of stackNavigator.
add a comment |
Use createStackNavigator instead of stackNavigator.
Use createStackNavigator instead of stackNavigator.
answered Nov 20 at 9:56
Stundji
420212
420212
add a comment |
add a comment |
Replace this Code :
import { createDrawerNavigator, createStackNavigator } from 'react-navigation';
With this import of your project :
import { DrawerNavigator, StackNavigator } from 'react-navigation';
i hope this help you !
here I am using StackNavigator,If I changed above getting can't find variable: StackNavigator
– rams
Nov 20 at 14:07
check your code and see where you use StackNavigator and replace it with createStackNavigator im not sure but should help
– MoHammaD ReZa DehGhani
Nov 20 at 14:10
not working getting undefined is not an object
– rams
Nov 20 at 14:19
ok did you linked your dependency ? like this : react-native link and : react-native link react-navigation
– MoHammaD ReZa DehGhani
Nov 20 at 14:22
1
check app.json file above
– rams
Nov 20 at 14:27
|
show 7 more comments
Replace this Code :
import { createDrawerNavigator, createStackNavigator } from 'react-navigation';
With this import of your project :
import { DrawerNavigator, StackNavigator } from 'react-navigation';
i hope this help you !
here I am using StackNavigator,If I changed above getting can't find variable: StackNavigator
– rams
Nov 20 at 14:07
check your code and see where you use StackNavigator and replace it with createStackNavigator im not sure but should help
– MoHammaD ReZa DehGhani
Nov 20 at 14:10
not working getting undefined is not an object
– rams
Nov 20 at 14:19
ok did you linked your dependency ? like this : react-native link and : react-native link react-navigation
– MoHammaD ReZa DehGhani
Nov 20 at 14:22
1
check app.json file above
– rams
Nov 20 at 14:27
|
show 7 more comments
Replace this Code :
import { createDrawerNavigator, createStackNavigator } from 'react-navigation';
With this import of your project :
import { DrawerNavigator, StackNavigator } from 'react-navigation';
i hope this help you !
Replace this Code :
import { createDrawerNavigator, createStackNavigator } from 'react-navigation';
With this import of your project :
import { DrawerNavigator, StackNavigator } from 'react-navigation';
i hope this help you !
answered Nov 20 at 14:00
MoHammaD ReZa DehGhani
112115
112115
here I am using StackNavigator,If I changed above getting can't find variable: StackNavigator
– rams
Nov 20 at 14:07
check your code and see where you use StackNavigator and replace it with createStackNavigator im not sure but should help
– MoHammaD ReZa DehGhani
Nov 20 at 14:10
not working getting undefined is not an object
– rams
Nov 20 at 14:19
ok did you linked your dependency ? like this : react-native link and : react-native link react-navigation
– MoHammaD ReZa DehGhani
Nov 20 at 14:22
1
check app.json file above
– rams
Nov 20 at 14:27
|
show 7 more comments
here I am using StackNavigator,If I changed above getting can't find variable: StackNavigator
– rams
Nov 20 at 14:07
check your code and see where you use StackNavigator and replace it with createStackNavigator im not sure but should help
– MoHammaD ReZa DehGhani
Nov 20 at 14:10
not working getting undefined is not an object
– rams
Nov 20 at 14:19
ok did you linked your dependency ? like this : react-native link and : react-native link react-navigation
– MoHammaD ReZa DehGhani
Nov 20 at 14:22
1
check app.json file above
– rams
Nov 20 at 14:27
here I am using StackNavigator,If I changed above getting can't find variable: StackNavigator
– rams
Nov 20 at 14:07
here I am using StackNavigator,If I changed above getting can't find variable: StackNavigator
– rams
Nov 20 at 14:07
check your code and see where you use StackNavigator and replace it with createStackNavigator im not sure but should help
– MoHammaD ReZa DehGhani
Nov 20 at 14:10
check your code and see where you use StackNavigator and replace it with createStackNavigator im not sure but should help
– MoHammaD ReZa DehGhani
Nov 20 at 14:10
not working getting undefined is not an object
– rams
Nov 20 at 14:19
not working getting undefined is not an object
– rams
Nov 20 at 14:19
ok did you linked your dependency ? like this : react-native link and : react-native link react-navigation
– MoHammaD ReZa DehGhani
Nov 20 at 14:22
ok did you linked your dependency ? like this : react-native link and : react-native link react-navigation
– MoHammaD ReZa DehGhani
Nov 20 at 14:22
1
1
check app.json file above
– rams
Nov 20 at 14:27
check app.json file above
– rams
Nov 20 at 14:27
|
show 7 more comments
This issue can be for haven't installed Android SDK platform 25 Do this :
- Open Android Studio
- Open SDK Manager
- Click SDK Platforms Tab
- Select android 7.1.1 (Nougat) API level is 25
- Apply
After installing that press OK and try again to build the project.
add a comment |
This issue can be for haven't installed Android SDK platform 25 Do this :
- Open Android Studio
- Open SDK Manager
- Click SDK Platforms Tab
- Select android 7.1.1 (Nougat) API level is 25
- Apply
After installing that press OK and try again to build the project.
add a comment |
This issue can be for haven't installed Android SDK platform 25 Do this :
- Open Android Studio
- Open SDK Manager
- Click SDK Platforms Tab
- Select android 7.1.1 (Nougat) API level is 25
- Apply
After installing that press OK and try again to build the project.
This issue can be for haven't installed Android SDK platform 25 Do this :
- Open Android Studio
- Open SDK Manager
- Click SDK Platforms Tab
- Select android 7.1.1 (Nougat) API level is 25
- Apply
After installing that press OK and try again to build the project.
answered Nov 21 at 8:01
MoHammaD ReZa DehGhani
112115
112115
add a comment |
add a comment |
you could have a look at this example code here:
https://snack.expo.io/@eriveltonelias/stack-actions
I think the problem is :
- with stackNavigator, you should use createStackNavigator
(https://reactnavigation.org/docs/en/stack-navigator.html)
and - instead of drawerNavigator use createDrawerNavigator (https://reactnavigation.org/docs/en/drawer-navigator.html)
add a comment |
you could have a look at this example code here:
https://snack.expo.io/@eriveltonelias/stack-actions
I think the problem is :
- with stackNavigator, you should use createStackNavigator
(https://reactnavigation.org/docs/en/stack-navigator.html)
and - instead of drawerNavigator use createDrawerNavigator (https://reactnavigation.org/docs/en/drawer-navigator.html)
add a comment |
you could have a look at this example code here:
https://snack.expo.io/@eriveltonelias/stack-actions
I think the problem is :
- with stackNavigator, you should use createStackNavigator
(https://reactnavigation.org/docs/en/stack-navigator.html)
and - instead of drawerNavigator use createDrawerNavigator (https://reactnavigation.org/docs/en/drawer-navigator.html)
you could have a look at this example code here:
https://snack.expo.io/@eriveltonelias/stack-actions
I think the problem is :
- with stackNavigator, you should use createStackNavigator
(https://reactnavigation.org/docs/en/stack-navigator.html)
and - instead of drawerNavigator use createDrawerNavigator (https://reactnavigation.org/docs/en/drawer-navigator.html)
answered Nov 22 at 7:50
Der_D
517
517
add a comment |
add a comment |
I stumbled upon this because I was experiencing the same error message. Besides createStackNavigator
as opposed to StackNavigator
. The issue was that I upgraded to 3.x and, new in 3 is createAppContainer
.
Now, instead of
export default DrawerNavigatorExample;
you need to have
export default createAppContainer(DrawerNavigatorExample)
Hope this saves someone else the hour I spent researching this :/
link to docs
add a comment |
I stumbled upon this because I was experiencing the same error message. Besides createStackNavigator
as opposed to StackNavigator
. The issue was that I upgraded to 3.x and, new in 3 is createAppContainer
.
Now, instead of
export default DrawerNavigatorExample;
you need to have
export default createAppContainer(DrawerNavigatorExample)
Hope this saves someone else the hour I spent researching this :/
link to docs
add a comment |
I stumbled upon this because I was experiencing the same error message. Besides createStackNavigator
as opposed to StackNavigator
. The issue was that I upgraded to 3.x and, new in 3 is createAppContainer
.
Now, instead of
export default DrawerNavigatorExample;
you need to have
export default createAppContainer(DrawerNavigatorExample)
Hope this saves someone else the hour I spent researching this :/
link to docs
I stumbled upon this because I was experiencing the same error message. Besides createStackNavigator
as opposed to StackNavigator
. The issue was that I upgraded to 3.x and, new in 3 is createAppContainer
.
Now, instead of
export default DrawerNavigatorExample;
you need to have
export default createAppContainer(DrawerNavigatorExample)
Hope this saves someone else the hour I spent researching this :/
link to docs
answered Dec 3 at 20:09
gwalshington
9821726
9821726
add a comment |
add a comment |
in package.json edit react-navigation to '^2.17.0' NEXT restart your pc
Can you explain how this wlll solve the problem?
– Nick
Dec 21 at 8:22
i try,and its works
– Dzuhri Andika
Dec 26 at 7:58
another solutions, downgrade react-navigation to version 2.17.0
– Dzuhri Andika
Dec 26 at 7:59
add a comment |
in package.json edit react-navigation to '^2.17.0' NEXT restart your pc
Can you explain how this wlll solve the problem?
– Nick
Dec 21 at 8:22
i try,and its works
– Dzuhri Andika
Dec 26 at 7:58
another solutions, downgrade react-navigation to version 2.17.0
– Dzuhri Andika
Dec 26 at 7:59
add a comment |
in package.json edit react-navigation to '^2.17.0' NEXT restart your pc
in package.json edit react-navigation to '^2.17.0' NEXT restart your pc
answered Dec 21 at 8:04
Dzuhri Andika
1
1
Can you explain how this wlll solve the problem?
– Nick
Dec 21 at 8:22
i try,and its works
– Dzuhri Andika
Dec 26 at 7:58
another solutions, downgrade react-navigation to version 2.17.0
– Dzuhri Andika
Dec 26 at 7:59
add a comment |
Can you explain how this wlll solve the problem?
– Nick
Dec 21 at 8:22
i try,and its works
– Dzuhri Andika
Dec 26 at 7:58
another solutions, downgrade react-navigation to version 2.17.0
– Dzuhri Andika
Dec 26 at 7:59
Can you explain how this wlll solve the problem?
– Nick
Dec 21 at 8:22
Can you explain how this wlll solve the problem?
– Nick
Dec 21 at 8:22
i try,and its works
– Dzuhri Andika
Dec 26 at 7:58
i try,and its works
– Dzuhri Andika
Dec 26 at 7:58
another solutions, downgrade react-navigation to version 2.17.0
– Dzuhri Andika
Dec 26 at 7:59
another solutions, downgrade react-navigation to version 2.17.0
– Dzuhri Andika
Dec 26 at 7:59
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53388478%2fgetting-undefined-is-not-a-function-evaluating-0-reactnavigation-stacknaviga%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
How can we help without inspecting your code? So please be more elaborate on asking question.
– Samitha Nanayakkara
Nov 20 at 8:21
replace stacknavigator by StackNavigator or createStackNavigator, capitalization matters!
– Steve Nosse
Nov 20 at 9:43