0.2.1 • Published 9 years ago

pure-stamp v0.2.1

Weekly downloads
55
License
MIT
Repository
github
Last release
9 years ago

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.

0.2.1

9 years ago

0.2.0

10 years ago

0.1.14

10 years ago

0.1.13

10 years ago

0.1.12

10 years ago

0.1.11

10 years ago

0.1.10

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago