preact-pure-props
compare only the props. If the state does not change, do not re-ender.
Last updated a year ago by younkue .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install preact-pure-props 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.1.4                                ...           latest (a year ago)

5 Versions

  • 0.1.4                                ...           a year ago
  • 0.1.3                                ...           a year ago
  • 0.1.2                                ...           a year ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |