npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ks-stack/react-native-recyclerview

v0.0.13

Published

一个纯`react-native`实现的滚动列表,借鉴于[react-native-largelist](https://github.com/bolan9999/react-native-largelist)和[recyclerlistview](https://github.com/Flipkart/recyclerlistview),更少的预渲染数量,更流畅的滚动表现。底层使用`react-native`自带的`ScrollView`,没有额外原生依赖

Downloads

23

Readme

react-native-recyclerview

一个纯react-native实现的滚动列表,借鉴于react-native-largelistrecyclerlistview,更少的预渲染数量,更流畅的滚动表现。底层使用react-native自带的ScrollView,没有额外原生依赖

Demerits

必须提前传入列表元素的高度(横向滚动时为宽度)

Todo

  1. 刷新头
  2. 粘性item

Getting started

$ yarn add @ks-stack/react-native-recyclerview

Usage

参考example文件夹

Props

理论上兼容除contentContainerStyle的全部ScrollView的属性,以下为新增属性 Prop name | Description | Type | Default value | Required -----------------------|---------------|-----------|---------------|--------- countForItem | 列表元素的总数量 | number | none | true renderForItem | 列表元素的渲染方法 | funtion | none | true heightForItem | 列表元素的高度(横向滚动时为宽度),传入数值时采用react-native-largelist的模式,传入方法时采用recyclerlistview的模式 | funtion | number | none | true numColumns | 同FlatList | number | 1 | false renderForHeader | 列表头部的渲染方法,注意头部不会复用,会一直存在 | funtion | none | false heightForHeader | 列表头部的高度 | number | none | false renderForFooter | 列表尾部的渲染方法,注意尾部不会复用,会一直存在 | funtion | none | false heightForFooter | 列表尾部的高度 | number | none | false ListEmptyComponent | 列表为空时渲染的组件 | funtion | component | none | false preOffset | 预渲染的偏移量,增大该数值可减少图片渲染慢的白屏几率 | number | ios200,安卓800,因为glide渲染图片实在太慢了 | false onEndReachedThreshold| 同FlatList | number | 1 | false onEndReached | 同FlatList | funtion | none | false onVisibleItemsChange | 同FlatList | funtion | none | false

Methods

Method name | Description -----------------------|--------------- scrollTo | 同ScrollView scrollToEnd | 同ScrollView flashScrollIndicators| 同ScrollView

Run the example app

Make sure to have an emulator running or an Android device connected, and then:

$ glit clone https://github.com/ks-stack/react-native-recyclerview.git
$ yarn
$ cd ios && pod install && cd ..
$ react-native run-ios
$ react-native run-android