Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

Prop warnings stickyHeaderIndices, onEndReachedThreshold, renderScrollComponent #19

Open
M3po opened this issue Dec 5, 2016 · 3 comments

Comments

@M3po
Copy link

M3po commented Dec 5, 2016

I have tried the example of LazyLoadListView you provided and i am getting warnings

// I figured this out
Failed prop type: Required prop stickyHeaderIndices was not specified in LazyloadListView.
// I Figured this out
Failed prop type: Required prop onEndReachedThreshold was not specified in LazyloadListView.
// Still have to
Failed prop type: Required prop renderScrollComponent was not specified in LazyloadListView.

I have followed everything as you shown in example, but i cant seem to figure out why im getting this errors

@sharkstate
Copy link

How did you solve the first two? Thx

@mtt87
Copy link

mtt87 commented Jan 31, 2017

They forgot to put the defaultProps, you can quickly fix it editing LazyloadListView.js here

...
class LazyloadListView extends Component{
    static displayName = 'LazyloadListView';

    static propTypes = {
        ...ListView.propTypes
    };

    // THIS IS MISSING
    static defaultProps = {
        ...ListView.defaultProps
    }

    refresh () {
    ...

I've created a PR with the fix
#21

@decebal
Copy link

decebal commented Aug 4, 2017

@mtt87 I merged your fixes on my fork: https://github.com/decebal/react-native-lazyload, thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants