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 🙏

© 2026 – Pkg Stats / Ryan Hefner

pure-react-native

v0.0.4

Published

Pure React Native UI components

Readme

Pure React Native Components

安装和使用(TL;DR;)

Step 1:

npm install pure-react-native --save

Step 2:

import {Button} from pure-react-native;
<Button
  type="blue"
  text="Submit"
  onPress={alert("Pressed!")}
  onLongPress={alert("Long Pressed!")}
/>

Step 3:

That's it!

为什么使用Pure Components(Why Pure Components)

无状态的组件又被叫做“纯粹的组件”,或者“白痴组件”,这是指这样的一些组件:React组件中有一些被声明为函数(而不是继承自Component的class),它们没有state,只要给定同样的props,就会返回同样的标签块。

这种类型的组件出人意料的成为构建大型应用程序的常用方法,所以,自从React 0.14开始支持使用函数的方式来创建这种无状态组件,所以也被叫做“函数式无状态组件”。

无状态组件渲染效率更高,编写和组合更加简单,我在整理自己的UI库的时候发现,这是一种很好的方法,所以我尽量使用无状态的方式来构建所有这些UI组件。

这就是为什么这个库叫做Pure React Native,它足够简单,你可以马上在项目中开始使用。

Stateless components may also be referred to as Pure Components, or even Dumb Components, and are meant to represent any React Component declared as a function that has no state and returns the same markup given the same props.

These types of components surprisingly compose a large majority of our applications and, as a result, React 0.14 introduces the ability to write these stateless components as functions, also known as functional stateless components.

So these are some of the UI elements that I summarize from Tencent work.

They are simple enough that you can grab and put it into your project now.

Buttons

import { Button } from 'react-native-elements'

<Button
  text='BUTTON'
/>

<Button
  type="line"
  text='LINE STYLE BUTTON'
/>

<Button
  large
  text="SMALL WITH RIGHT ICON"
  onPress={alert("Pressed!")}
  onLongPress={alert("Long Pressed!")}
  style={{marginLeft:10, backgroundColor:"blue"}}
/>

<Button
  text='BUTTON WITH ICON' />
  disabled
/>

Button API

| prop | default | type | description | | ---- | ---- | ----| ---- | | onPress | none | function | press event handler | | onLongPress | none | function | long press event handler | | disabled | false | boolean | disable a button(both style and functional) | | large | false | boolean | a quick way to change button style to large | | text | none | string | text inside the button | | style | none | object | custom the button container style | | textStyle | none | object | custom the text style |

List Cell

Toast

Roadmap

I AM SORRY THAT I DON'T HAVE ENOUGH TIME TO POLISH IT, AND HERE IS THE PLAN:

  • [x] Button
  • [x] List Cell
  • [x] Toast
  • [x] TabNav
  • [ ] Search
  • [ ] Dialog
  • [ ] Menu
  • [ ] Actionsheet
  • [ ] Share
  • [ ] Polish the API