question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

undefined is not an object (evaluating rngesturehandledmodule state

See original GitHub issue

my index.js

import {AppRegistry} from 'react-native';
// import App from './App';
// import Intro from './src/component/screen/IntroScreen';
import StackNavigator from './src/navigation/StackNavigator'
import {name as appName} from './app.json';

AppRegistry.registerComponent(appName, () => StackNavigator);

my introscreen.js

import React,{Component} from 'react';

import AppIntro from 'react-native-app-intro';
import { AppRegistry, Alert } from 'react-native';


// const styles = StyleSheet.create({
//     image : {
//         width : 320,
//         height : 320
//     }
// })



export default class IntroScreen extends Component {

    static navigationOptions = {
        header: null
      };
    
    
      onSkipBtnHandle = (index) => {
        Alert.alert('Skip');
        console.log(index);
      }
      doneBtnHandle = () => {
        Alert.alert('Done');
      }
      nextBtnHandle = (index) => {
        Alert.alert('Next');
        console.log(index);
      }
      onSlideChangeHandle = (index, total) => {
        console.log(index, total);
      }
 
    render(){

        const pageArray = [{
            title: 'Page 1',
            description: 'Description 1',
            img: '../../assets/1.jpg',
            imgStyle: {
              height: 80 * 2.5,
              width: 109 * 2.5,
            },
            backgroundColor: '#fa931d',
            fontColor: '#fff',
            level: 10,
          }, {
            title: 'Page 2',
            description: 'Description 2',
            img: require('../../assets/1.jpg'),
            imgStyle: {
              height: 93 * 2.5,
              width: 103 * 2.5,
            },
            backgroundColor: '#a4b602',
            fontColor: '#fff',
            level: 10,
          }];
        
        return(
            <AppIntro
            onNextBtnClick={this.nextBtnHandle}
            onDoneBtnClick={this.doneBtnHandle}
            onSkipBtnClick={this.onSkipBtnHandle}
            onSlideChange={this.onSlideChangeHandle}
            pageArray={pageArray}
        />
            
        )
    }
}
AppRegistry.registerComponent('IntroScreen', () => IntroScreen);

my stacknavigator.js


import React,{Component} from 'react';
import  {createStackNavigator} from 'react-navigation';
import IntroScreen from '../component/screen/IntroScreen';


export default (StackNavigator = createStackNavigator(
    {
      Intro: {
        path: "/",
        screen: IntroScreen
      },
      
    },
    {
      initialRouteName: "Intro",
      navigationOptions: {
        header: null
      }
    }
  ));

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
mstf0ta-appcommented, Mar 18, 2020

My new repo #135

if you can fix the parallax Please

0reactions
ddiegommachadocommented, Mar 14, 2019

In the node_modules/react-native-swiper/src/index.js import React{ StyleSheet, Text, ....... change for: import { StyleSheet, Text, ....... With me it worked!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - undefined is not an object (evaluating ...
undefined is not an object (evaluating 'RNGestureHandlerModule.State' · This all looks correct, can you show the code for the Home component? – ...
Read more >
undefined is not an object (evaluating ... - GitHub
I had a similar issue. I'm using CocoaPods instead of react-native link. Add this to your podfile: pod 'RNGestureHandler', :path => '..
Read more >
undefined is not an object (evaluating ... - Edward Beazer
undefined is not an object (evaluating 'RNGestureHandlerModule.State'). Error while installing React Navigation. Sun, 06 Jan 2019.
Read more >
[Solved]-React Native - undefined is not an object(evaluating ...
Coding example for the question React Native - undefined is not an object(evaluating 'RNGestureHandlerModule.state')-React Native.
Read more >
undefined is not an object (evaluating ... - CSDN博客
undefined is not an object (evaluating 'RNGestureHandlerModule.State'React Navigation 升级到3.x版本后,遇到了undefined is not an object ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found