React Native - undefined is not an object(evaluating 'RNGestureHandlerModule.state')












0















I get this error and it's driving me insane, I cannot even start a simple application on React Native. I am using the most basic example, with a fresh project and still throws this error.
I use react-navigation v3xx
Someone please help because I am losing my mind, thank you.
Here is the code I have:



import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, Button, TouchableHighlight} from 'react-native';
import { createAppContainer, createStackNavigator, StackActions, NavigationActions } from 'react-navigation'; // Version can be specified in package.json


class Home extends React.Component {
static navigationOptions = {
title: "Home",
}
render() {
return (
<View style={styles.container}>
<Text>Home Page</Text>
<Button onPress={() => this.props.navigation.navigate('About')} title="All about me" />
</View>
);
}
}

class AboutMeMe extends React.Component {
static navigationOptions = {
title: "All Me",
}
render() {
return (
<View style={styles.container}>
<Text>Home Page</Text>
<Button onPress={() => this.props.navigation.goBack()} title="<< Back" />
</View>
);
}
}

const AppScreens = createStackNavigator({
Home: Home,
About: AboutMeMe
})

const App = createAppContainer(AppScreens);

const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
});


export default App;









share|improve this question























  • Possible duplicate of: stackoverflow.com/questions/52861437/…

    – Matt Aft
    Nov 20 '18 at 21:14













  • @MattAft Thank you so much! the first answer worked for me, if you post the link as an answer, I will upvote you and accept the answer!

    – squeekyDave
    Nov 20 '18 at 21:32
















0















I get this error and it's driving me insane, I cannot even start a simple application on React Native. I am using the most basic example, with a fresh project and still throws this error.
I use react-navigation v3xx
Someone please help because I am losing my mind, thank you.
Here is the code I have:



import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, Button, TouchableHighlight} from 'react-native';
import { createAppContainer, createStackNavigator, StackActions, NavigationActions } from 'react-navigation'; // Version can be specified in package.json


class Home extends React.Component {
static navigationOptions = {
title: "Home",
}
render() {
return (
<View style={styles.container}>
<Text>Home Page</Text>
<Button onPress={() => this.props.navigation.navigate('About')} title="All about me" />
</View>
);
}
}

class AboutMeMe extends React.Component {
static navigationOptions = {
title: "All Me",
}
render() {
return (
<View style={styles.container}>
<Text>Home Page</Text>
<Button onPress={() => this.props.navigation.goBack()} title="<< Back" />
</View>
);
}
}

const AppScreens = createStackNavigator({
Home: Home,
About: AboutMeMe
})

const App = createAppContainer(AppScreens);

const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
});


export default App;









share|improve this question























  • Possible duplicate of: stackoverflow.com/questions/52861437/…

    – Matt Aft
    Nov 20 '18 at 21:14













  • @MattAft Thank you so much! the first answer worked for me, if you post the link as an answer, I will upvote you and accept the answer!

    – squeekyDave
    Nov 20 '18 at 21:32














0












0








0








I get this error and it's driving me insane, I cannot even start a simple application on React Native. I am using the most basic example, with a fresh project and still throws this error.
I use react-navigation v3xx
Someone please help because I am losing my mind, thank you.
Here is the code I have:



import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, Button, TouchableHighlight} from 'react-native';
import { createAppContainer, createStackNavigator, StackActions, NavigationActions } from 'react-navigation'; // Version can be specified in package.json


class Home extends React.Component {
static navigationOptions = {
title: "Home",
}
render() {
return (
<View style={styles.container}>
<Text>Home Page</Text>
<Button onPress={() => this.props.navigation.navigate('About')} title="All about me" />
</View>
);
}
}

class AboutMeMe extends React.Component {
static navigationOptions = {
title: "All Me",
}
render() {
return (
<View style={styles.container}>
<Text>Home Page</Text>
<Button onPress={() => this.props.navigation.goBack()} title="<< Back" />
</View>
);
}
}

const AppScreens = createStackNavigator({
Home: Home,
About: AboutMeMe
})

const App = createAppContainer(AppScreens);

const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
});


export default App;









share|improve this question














I get this error and it's driving me insane, I cannot even start a simple application on React Native. I am using the most basic example, with a fresh project and still throws this error.
I use react-navigation v3xx
Someone please help because I am losing my mind, thank you.
Here is the code I have:



import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, Button, TouchableHighlight} from 'react-native';
import { createAppContainer, createStackNavigator, StackActions, NavigationActions } from 'react-navigation'; // Version can be specified in package.json


class Home extends React.Component {
static navigationOptions = {
title: "Home",
}
render() {
return (
<View style={styles.container}>
<Text>Home Page</Text>
<Button onPress={() => this.props.navigation.navigate('About')} title="All about me" />
</View>
);
}
}

class AboutMeMe extends React.Component {
static navigationOptions = {
title: "All Me",
}
render() {
return (
<View style={styles.container}>
<Text>Home Page</Text>
<Button onPress={() => this.props.navigation.goBack()} title="<< Back" />
</View>
);
}
}

const AppScreens = createStackNavigator({
Home: Home,
About: AboutMeMe
})

const App = createAppContainer(AppScreens);

const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
});


export default App;






react-native react-native-ios react-native-navigation






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 20 '18 at 21:06









squeekyDavesqueekyDave

411215




411215













  • Possible duplicate of: stackoverflow.com/questions/52861437/…

    – Matt Aft
    Nov 20 '18 at 21:14













  • @MattAft Thank you so much! the first answer worked for me, if you post the link as an answer, I will upvote you and accept the answer!

    – squeekyDave
    Nov 20 '18 at 21:32



















  • Possible duplicate of: stackoverflow.com/questions/52861437/…

    – Matt Aft
    Nov 20 '18 at 21:14













  • @MattAft Thank you so much! the first answer worked for me, if you post the link as an answer, I will upvote you and accept the answer!

    – squeekyDave
    Nov 20 '18 at 21:32

















Possible duplicate of: stackoverflow.com/questions/52861437/…

– Matt Aft
Nov 20 '18 at 21:14







Possible duplicate of: stackoverflow.com/questions/52861437/…

– Matt Aft
Nov 20 '18 at 21:14















@MattAft Thank you so much! the first answer worked for me, if you post the link as an answer, I will upvote you and accept the answer!

– squeekyDave
Nov 20 '18 at 21:32





@MattAft Thank you so much! the first answer worked for me, if you post the link as an answer, I will upvote you and accept the answer!

– squeekyDave
Nov 20 '18 at 21:32












2 Answers
2






active

oldest

votes


















3














Hellow



As react navigation now depends on gesture so you must install an additional library to go after you have installed the react-navigation library



Run this command inside your project from your terminal



npm install --save react-native-gesture-handler



Then run this one



react-native link react-native-gesture-handler



These instructions are well explained here



https://reactnavigation.org/docs/en/getting-started.html#installation



for new react navigation version



Best regards






share|improve this answer

































    1














    npm install --save react-native-gesture-handler
    react-native link react-native-gesture-handler






    share|improve this answer
























    • Please try to provide a nice description about how your solution works. See: How do I write a good answer? Thanks

      – Rajesh Pandya
      Nov 27 '18 at 7:12











    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
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53401535%2freact-native-undefined-is-not-an-objectevaluating-rngesturehandlermodule-sta%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    Hellow



    As react navigation now depends on gesture so you must install an additional library to go after you have installed the react-navigation library



    Run this command inside your project from your terminal



    npm install --save react-native-gesture-handler



    Then run this one



    react-native link react-native-gesture-handler



    These instructions are well explained here



    https://reactnavigation.org/docs/en/getting-started.html#installation



    for new react navigation version



    Best regards






    share|improve this answer






























      3














      Hellow



      As react navigation now depends on gesture so you must install an additional library to go after you have installed the react-navigation library



      Run this command inside your project from your terminal



      npm install --save react-native-gesture-handler



      Then run this one



      react-native link react-native-gesture-handler



      These instructions are well explained here



      https://reactnavigation.org/docs/en/getting-started.html#installation



      for new react navigation version



      Best regards






      share|improve this answer




























        3












        3








        3







        Hellow



        As react navigation now depends on gesture so you must install an additional library to go after you have installed the react-navigation library



        Run this command inside your project from your terminal



        npm install --save react-native-gesture-handler



        Then run this one



        react-native link react-native-gesture-handler



        These instructions are well explained here



        https://reactnavigation.org/docs/en/getting-started.html#installation



        for new react navigation version



        Best regards






        share|improve this answer















        Hellow



        As react navigation now depends on gesture so you must install an additional library to go after you have installed the react-navigation library



        Run this command inside your project from your terminal



        npm install --save react-native-gesture-handler



        Then run this one



        react-native link react-native-gesture-handler



        These instructions are well explained here



        https://reactnavigation.org/docs/en/getting-started.html#installation



        for new react navigation version



        Best regards







        share|improve this answer














        share|improve this answer



        share|improve this answer








        answered Nov 27 '18 at 7:57


























        community wiki





        Last Breath


























            1














            npm install --save react-native-gesture-handler
            react-native link react-native-gesture-handler






            share|improve this answer
























            • Please try to provide a nice description about how your solution works. See: How do I write a good answer? Thanks

              – Rajesh Pandya
              Nov 27 '18 at 7:12
















            1














            npm install --save react-native-gesture-handler
            react-native link react-native-gesture-handler






            share|improve this answer
























            • Please try to provide a nice description about how your solution works. See: How do I write a good answer? Thanks

              – Rajesh Pandya
              Nov 27 '18 at 7:12














            1












            1








            1







            npm install --save react-native-gesture-handler
            react-native link react-native-gesture-handler






            share|improve this answer













            npm install --save react-native-gesture-handler
            react-native link react-native-gesture-handler







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 27 '18 at 7:05









            Mijiddorj NamsraiMijiddorj Namsrai

            111




            111













            • Please try to provide a nice description about how your solution works. See: How do I write a good answer? Thanks

              – Rajesh Pandya
              Nov 27 '18 at 7:12



















            • Please try to provide a nice description about how your solution works. See: How do I write a good answer? Thanks

              – Rajesh Pandya
              Nov 27 '18 at 7:12

















            Please try to provide a nice description about how your solution works. See: How do I write a good answer? Thanks

            – Rajesh Pandya
            Nov 27 '18 at 7:12





            Please try to provide a nice description about how your solution works. See: How do I write a good answer? Thanks

            – Rajesh Pandya
            Nov 27 '18 at 7:12


















            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53401535%2freact-native-undefined-is-not-an-objectevaluating-rngesturehandlermodule-sta%23new-answer', 'question_page');
            }
            );

            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







            Popular posts from this blog

            MongoDB - Not Authorized To Execute Command

            in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

            How to fix TextFormField cause rebuild widget in Flutter