# react-static-container

> Renders static content efficiently by allowing React to short-circuit the reconciliation process.

Latest version **1.0.2** (published 2017-10-20) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install react-static-container
pnpm add react-static-container
yarn add react-static-container
bun add react-static-container
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-10-20 |
| First published | 2015-08-04 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 222 |
| Maintainers | fb, zpao |
| Keywords | react-component |

## Links

- npm: https://www.npmjs.com/package/react-static-container
- Repository: https://github.com/reactjs/react-static-container
- Issues: https://github.com/reactjs/react-static-container/issues
- npm.io page: https://npm.io/package/react-static-container

## Recent versions

- 1.0.2 (latest) — 2017-10-20
- 1.0.1 — 2016-04-08
- 1.0.0 — 2015-10-09
- 1.0.0-alpha.1 — 2015-08-04

## README

# react-static-container

Renders static content efficiently by allowing React to short-circuit the
reconciliation process. This component should be used when you know that a
subtree of components will never need to be updated.

Typically, you will not need to use this component and should opt for normal
React reconciliation.


## Installation

```sh
npm install react-static-container
```

## Usage

```js

var StaticContainer = require('react-static-container');

var someValue = ...; // We know for certain this value will never change.

class MyComponent extends React.Component {
  render() {
    return (
      <div>
        {this.props.value}
        <StaticContainer>
          <MyOtherComponent value={someValue} />
        </StaticContainer>
      <div>
    );
  }
 );
```

`StaticContainer` also takes a `shouldUpdate` prop as an escape hatch, allowing granular updates.

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