Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-pure-props

daybrush917MIT0.1.5TypeScript support: included

compare only the props. If the state does not change, do not re-ender.

pure-component, purecomponent, pure-props

readme

react-pure-props npm version

It is a little different from the PureComponent of react.

First, compare only the props. If the state does not change, do not re-render.

However, if the update does not change only through setState, it also re-render.

Installation

npm

$ npm install react-pure-props

How to use

import PureProps from "react-pure-props";

class Component extends PureProps<{}, {}> {
    public render() {
        return (
            <div />
        );
    }
}

License

MIT License

Copyright (c) 2019 Daybrush