Permalink
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (8 sloc) 283 Bytes

pure()

An enhancer that makes component re-render only when its props change. Uses fast-shallow-equal to do shallow prop comparison.

Usage

import {pure} from 'libreact/lib/pure';

const PureComp = pure(Comp);