JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10198
  • Score
    100M100P100Q134967F
  • License MIT

Makes React components pure.

Package Exports

  • pure-render-decorator

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pure-render-decorator) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Pure render decorator

An ES7 decorator to make React components "pure".

Installation

npm install pure-render-decorator

Usage

import {Component} from 'react';
import pureRender from 'pure-render-decorator';

@pureRender
class Test extends Component {
  render() {
    return <div></div>;
  }
}

The above example is the same as using PureRenderMixin:

var React = require('react');
var PureRenderMixin = require('react-addons-pure-render-mixin');

var Test = React.createClass({
  mixins: [
    PureRenderMixin
  ],

  render: function() {
    return <div></div>;
  }
});