undefined is not an object (evaluating rngesturehandledmodule state
See original GitHub issuemy 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:
- Created 5 years ago
- Comments:9
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
if you can fix the parallax Please
In the node_modules/react-native-swiper/src/index.js
import React{ StyleSheet, Text, .......
change for:import { StyleSheet, Text, .......
With me it worked!!