# react-ignore-rerender

> Simple component to ignore re-rendering of a piece of React's render method

Latest version **1.3.2** (published 2019-01-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-ignore-rerender
pnpm add react-ignore-rerender
yarn add react-ignore-rerender
bun add react-ignore-rerender
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.2 |
| Published | 2019-01-19 |
| First published | 2019-01-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 12.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 27 |
| Author | soroushchehresa |
| Maintainers | soroush_chs |
| Keywords | react, rerender, render, rendering, ignore, performance |

## Links

- npm: https://www.npmjs.com/package/react-ignore-rerender
- Repository: https://github.com/soroushchehresa/react-ignore-rerender
- Homepage: https://github.com/soroushchehresa/react-ignore-rerender#readme
- Issues: https://github.com/soroushchehresa/react-ignore-rerender/issues
- npm.io page: https://npm.io/package/react-ignore-rerender

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.3.2 (latest) — 2019-01-19
- 1.3.1 — 2019-01-19
- 1.3.0 — 2019-01-19
- 1.2.2 — 2019-01-19
- 1.2.1 — 2019-01-19
- 1.2.0 — 2019-01-19
- 1.1.3 — 2019-01-19
- 1.1.2 — 2019-01-19
- 1.1.1 — 2019-01-19
- 1.1.0 — 2019-01-19
- 1.0.0 — 2019-01-16

## README

[![NPM](https://img.shields.io/npm/v/react-ignore-rerender.svg)](https://www.npmjs.com/package/react-ignore-rerender) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

# react-ignore-rerender

Simple component for ignore re-rendering of a piece of React's render method.

## Install

npm:

```bash
npm i -S react-ignore-rerender
```


yarn:

```bash
yarn add react-ignore-rerender
```

## Usage

```jsx
import React, { Component } from 'react';
import IgnoreRerender from 'react-ignore-rerender';

class ExampleComponent extends Component {
  constructor(props) {
    super(props);
    this.state = {
      showTitle: false,
      showDescription: false,
    };
  }
  render () {
    const {showTitle, showDescription} = this.state;
    return (
      <IgnoreRerender whiteList={{ showTitle, showDescription }}>
        { showTitle && <h1>Title</h1> }
        { showDescription && <p>Description</p> }
      </IgnoreRerender>
    )
  }
}
```
###### NOTE:

```ExampleComponent``` doesn't rerender when changing any props or state except ```showTitle``` and ```showDescription```.

## License

MIT © [soroushchehresa](https://github.com/soroushchehresa)

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