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
$ 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.

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 16
Dependencies (2)

Copyright 2014 - 2016 © taobao.org |