0.1.4 • Published 5 years ago

preact-pure-props v0.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

preact-pure-props npm version

It is a little different from the PureComponent of preact.

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 preact-pure-props

How to use

import PureProps from "preact-pure-props";

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

License

MIT License

Copyright (c) 2019 Daybrush
0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago