lelandrichardson / react-native-parallax-view

Parallax view for vertical scrollview/listviews with a header image and header content
MIT License
1.29k stars 174 forks source link

Error. Cannot read property 'number' of undefined. #62

Open kkotkkio opened 6 years ago

kkotkkio commented 6 years ago
        <ParallaxView
          backgroundSource={null}
          windowHeight={43}
          header={(
            <View style={styles.header}>
              <View style={styles.headSearch}>
                <TextInput
                  style={styles.searchTextInput}
                  placeholder="검색"
                  placeholderTextColor="#C2C2C2"
                  underlineColorAndroid='transparent'
                />
                <Ionicons style={styles.searchIcon} name="md-search" size={20} color="#C2C2C2"/>
              </View>
              <View style={styles.headFilter}>
                <TouchableOpacity>
                  <Image style={styles.filterIcon} source={require('../assets/images/ic_filter.png')}/>
                </TouchableOpacity>
              </View>
            </View>
          )}
          scrollableViewStyle={{ backgroundColor: 'red' }}
        >

But I've got error.

2018-01-25 5 16 36

What's the matter?

Thing to changing is one it is backgroundSource require('image!backgroundImage') -> null. I don't need backgroundSource and it's just white. but before to change is error too.

2018-01-25 5 27 02

And I tried to remove backgroundSource, but it's a same error (Cannot read 'number').

ghost commented 6 years ago

same problem here! Error. Cannot read property 'number' of undefined

jamesst20 commented 6 years ago

Samething as soon as I import the lib

hugoh59 commented 6 years ago

Same here!

sengminea commented 6 years ago

Because the PropTypes in this project is imported with React.PropTypes which is not compatible with newer version of react native.

The correct way should be, import PropTypes from 'prop-types';

Please fix this!

adrianhartanto0 commented 5 years ago

Fucking dickhead. if you are not going to fix the issues might as well not create the library. asshole @lelandrichardson

lizandroconde commented 4 years ago

import PropTypes from 'prop-types';

100010 commented 4 years ago

This repository doesn't seem to be maintained. I created the same library that solved this problem. https://github.com/100010/react-native-parallax-header-view Please check.

xwg2015 commented 4 years ago

Same here!