FuYaoDe / react-native-app-intro

react-native-app-intro is a react native component implementing a parallax effect welcome page using base on react-native-swiper , similar to the one found in Google's app like Sheet, Drive, Docs...
MIT License
3.24k stars 508 forks source link

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

Open drm-code opened 6 years ago

drm-code commented 6 years ago

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

eriveltonelias commented 6 years ago

You can fix it just using

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

issue #102

drm-code commented 6 years ago

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

:sob:

reactnative react

drm-code commented 6 years ago

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 :+1:

225

eriveltonelias commented 6 years ago

@drm-code you're welcome. :)

giturra commented 6 years ago

@eriveltonelias thanks this worked for me too :)

apatche7 commented 6 years ago

that worked, but now Skip and Done buttons are very close to bullets fixed here => https://github.com/FuYaoDe/react-native-app-intro/issues/86

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

hhahh2011 commented 6 years ago

npm install react-native-app-intro@git@github.com:merryjs/react-native-app-intro.git --save 靠谱

ParthBarot-BoTreeConsulting commented 6 years ago

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

asifvora commented 5 years ago

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.

kukode commented 5 years ago

@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);
eriveltonelias commented 5 years ago

@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

kukode commented 5 years ago

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

kukode commented 5 years ago

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

kukode commented 5 years ago

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