react-native-app-intro
react-native-app-intro copied to clipboard
undefined is not an object (evaluating rngesturehandledmodule state
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
}
}
));
#104 I am using expo so its might get unreliable and make problem than react native classic
same issu
same issu
me too
Same here
same
same here
My new repo https://github.com/FuYaoDe/react-native-app-intro/issues/135
In the node_modules/react-native-swiper/src/index.js
import React{ StyleSheet, Text, .......
change for:
import { StyleSheet, Text, .......
With me it worked!!
My new repo #135
if you can fix the parallax Please