Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 311 Bytes

pure.md

File metadata and controls

24 lines (20 loc) · 311 Bytes

pure

Description

Prevents the component from updating unless a prop has changed. Uses shallowEqual() to test for changes.

API

pure : Function

Example

import {
  compose,
  pure,
} from 'incompose';

const A = (props) => (
  <h1>a</h1>
);

export default compose(
  pure,
)(A);