react-native-lazyload icon indicating copy to clipboard operation
react-native-lazyload copied to clipboard

Prop warnings stickyHeaderIndices, onEndReachedThreshold, renderScrollComponent

Open M3po opened this issue 8 years ago • 3 comments

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

M3po avatar Dec 05 '16 06:12 M3po

How did you solve the first two? Thx

sharkstate avatar Dec 11 '16 10:12 sharkstate

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 https://github.com/magicismight/react-native-lazyload/pull/21

mtt87 avatar Jan 31 '17 16:01 mtt87

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

decebal avatar Aug 04 '17 15:08 decebal