react-native-app-intro icon indicating copy to clipboard operation
react-native-app-intro copied to clipboard

undefined is not an object (evaluating rngesturehandledmodule state

Open kukode opened this issue 6 years ago • 9 comments

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

kukode avatar Nov 20 '18 02:11 kukode

#104 I am using expo so its might get unreliable and make problem than react native classic

eisenhaus335 avatar Jan 06 '19 04:01 eisenhaus335

same issu

raminrez avatar Jan 21 '19 11:01 raminrez

same issu

me too

gaoxuan-haxibiao avatar Jan 29 '19 14:01 gaoxuan-haxibiao

Same here

mayuroks avatar Jan 29 '19 18:01 mayuroks

same

joaowiciuk avatar Feb 07 '19 02:02 joaowiciuk

same here

klosowsk avatar Mar 01 '19 22:03 klosowsk

My new repo https://github.com/FuYaoDe/react-native-app-intro/issues/135

Richi2293 avatar Mar 07 '19 18:03 Richi2293

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

ddiegommachado avatar Mar 14 '19 15:03 ddiegommachado

My new repo #135

if you can fix the parallax Please

mstf0ta-app avatar Mar 18 '20 20:03 mstf0ta-app