1.1.2 • Published 4 years ago

react-more-load v1.1.2

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

SnapShots

a load more list component base on React

npm.io

react-more-load

$ npm install --save  react-more-load

how to use

  import ReactLoadMore from "react-more-load";
  const NoResult = ()=> <span>No more Result,~~</span>;
  const Footer = ()=> <span>loading....~~</span>;
 <ReactLoadMore
        onBottom={this.loadMore.bind(this)}
        fetching={fetching}
        hasMore={hasMore}
        NoResult={NoResult}
        Footer={null}
      >
        {dataList.map((item,index) => {
          return (
            <div style={{ height: "35vw", position: "relative" }} key={index}>
              <img
                src={item.extra.thumbnail_pic}
                style={{
                  width: "40vw",
                  height: "25w",
                  borderRadius:'3vw',
                  position: "absolute",
                  top: "2vw",
                  left: "2vw"
                }}
              />
              <span style={{ fontSize: "4vw", position: "absolute",
                  top: "5vw",
                  fontWeight:'bold',
                  left: "46vw"}}>{item.title}</span>
            </div>
          );
        })}
      </ReactLoadMore>

you can also fork the code and npm start to run the example.

props

paramstypedescnecessary
onBottomfuncwhen the user scroll to the bottomtrue
fetchingboolisFetchingDatatrue
hasMoreboolhas more datatrue
NoResultfuncreturn the ui dom of no resultfalse
Footerfuncreturn the ui dom loading Footerfalse

more

you can fork and check the example code to see the fully complishment.

If you have any of ideas,don't forget to leave an issue! And also star haha

License

ISC

1.1.2

4 years ago

1.1.1-n

4 years ago

1.1.0

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.0

5 years ago