FuYaoDe/react-native-app-intro

undefined is not an object (evaluating '_react3.default.PropType.bool')

drm-code opened this issue ยท 14 comments

I just install the plugin today and I got this error.

I read this https://stackoverflow.com/questions/42542540/react2-default-proptypes-function-is-undefined#answer-46434046, but I couldn't solve it, so I install the component on this one is based, and it works, but this one is easier to use, please fix the issue T_T

React: 0.49.5 ReactNativeCli: 2.0.1 OS: linux

reactnative

You can fix it just using

yarn add https://github.com/merryjs/react-native-app-intro

issue #102

Thanks @eriveltonelias that worked, but now Skip and Done buttons are very closer to bullets

๐Ÿ˜ญ

reactnative
react

I'm editing node_modules/react-native-app-intro/AppIntro.js changing the default styles and I got this result, I think it's decent but it needs more job ๐Ÿ‘

225

@drm-code you're welcome. :)

@eriveltonelias thanks this worked for me too :)

that worked, but now Skip and Done buttons are very close to bullets
fixed here => #86

By adding customStyles={{ btnContainer: { flex: 1 } }}

npm install react-native-app-intro@git@github.com:merryjs/react-native-app-intro.git --save ้ ่ฐฑ

Facing the same issue but under the react-native-swiper/../index.js, can you not merge the pull request into this? I assume many people would be facing this issue while upgrading RN version

simulator screen shot - iphone x - 2018-09-18 at 16 10 00

i got the error i have changes and set the ref to view.

@eriveltonelias
cannot work im get error
undefined is not an object (evaluating RNGestureHandlerModule state

my code index.js

/** @format */

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

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

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

@kukode I think that your project is missing the react-native-gesture-handler module, so you can solve it with yarn add react-native-gesture-handler && react-native link

yes im get error undefined is not an object (evaluating rngesturehandledmodule state

@eriveltonelias i get
Unable to resolve module react-native-app-intro but im already install this module

@eriveltonelias my dependenciy "react-native-app-intro": "git+https://github.com/merryjs/react-native-app-intro.git"
true or false ??