pure-stamp
Creates an optimized pure compose function with dependencies tacked onto it for easy lib propagation.
Last updated 2 years ago by cchamberlain .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install pure-stamp 
SYNC missed versions from official npm registry.

pure-stamp

Creates an optimized pure compose function with dependencies tacked onto it for easy lib propagation.

Build Status codecov

NPM

Install

npm install -S pure-stamp

Usage


import React from 'react'
import shallowCompare from 'react-addons-shallow-compare'
import pureStamp from 'pure-stamp'

const pure = pureStamp({ React, shallowCompare[, other[, libs ]] }[, defaults = {}])

/** Wraps commonly required dependencies for passing around a lib and optional defaults object for propagating configuration. */
const { React, PropTypes, cloneElement, other, libs, defaults } = pure

/** PureStamp is a React component with shouldComponentUpdate implemented (shallowCompare). */
const PureComponent = pure (...desc?: Stamp|ReactDesc|SpecDesc[])


/** Need to stop shouldComponentUpdate for a minute? */
const ImpureComponent = pure.impure (...desc?: Stamp|ReactDesc|SpecDesc[])

See react-stamp documentation on compose for usage.

Current Tags

  • 0.2.1                                ...           latest (2 years ago)

16 Versions

  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.14                                ...           2 years ago
  • 0.1.13                                ...           2 years ago
  • 0.1.12                                ...           2 years ago
  • 0.1.11                                ...           2 years ago
  • 0.1.10                                ...           2 years ago
  • 0.1.9                                ...           2 years ago
  • 0.1.8                                ...           2 years ago
  • 0.1.7                                ...           2 years ago
  • 0.1.6                                ...           2 years ago
  • 0.1.5                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 16
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)

Copyright 2014 - 2018 © taobao.org |