# preact-pure-props

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

Latest version **0.1.4** (published 2019-07-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install preact-pure-props
pnpm add preact-pure-props
yarn add preact-pure-props
bun add preact-pure-props
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2019-07-12 |
| First published | 2019-07-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 13 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Daybrush |
| Maintainers | younkue |
| Keywords | pure-component, purecomponent, pure-props, preact |

## Links

- npm: https://www.npmjs.com/package/preact-pure-props
- Repository: https://github.com/daybrush/pure-props/tree/master/preact-pure-props
- Homepage: https://github.com/daybrush/pure-props#readme
- Issues: https://github.com/daybrush/pure-props/issues
- npm.io page: https://npm.io/package/preact-pure-props

## Dependencies (1)

- [preact-compat](https://npm.io/package/preact-compat.md) ^3.19.0

## Recent versions

- 0.1.4 (latest) — 2019-07-12
- 0.1.3 — 2019-07-12
- 0.1.2 — 2019-07-12
- 0.1.1 — 2019-07-12
- 0.1.0 — 2019-07-11

## README

# preact-pure-props [![npm version](https://badge.fury.io/js/preact-pure-props.svg)](https://badge.fury.io/js/preact-pure-props)

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
```bash
$ npm install preact-pure-props
```
## How to use
```tsx
import PureProps from "preact-pure-props";

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


## License

```
MIT License

Copyright (c) 2019 Daybrush
```

---
_Source: https://npm.io/package/preact-pure-props · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
