Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reactjs/react-static-container
Renders static content efficiently by allowing React to short-circuit the reconciliation process.
https://github.com/reactjs/react-static-container
Last synced: 3 months ago
JSON representation
Renders static content efficiently by allowing React to short-circuit the reconciliation process.
- Host: GitHub
- URL: https://github.com/reactjs/react-static-container
- Owner: reactjs
- License: other
- Archived: true
- Created: 2015-05-28T00:09:56.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-07-19T16:34:23.000Z (over 5 years ago)
- Last Synced: 2024-09-22T05:02:33.098Z (3 months ago)
- Language: JavaScript
- Size: 103 KB
- Stars: 223
- Watchers: 11
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-react-components-all - react-static-container - Renders static content efficiently by allowing React to short-circuit the reconciliation process. (Uncategorized / Uncategorized)
- awesome-react-components - react-static-container - Renders static content efficiently. (Performance / UI)
- awesome-list - react-static-container - Renders static content efficiently by allowing React to short-circuit the reconciliation process. (Performance / UI)
- awesome-react-components - react-static-container - Renders static content efficiently. (Performance / UI)
- awesome-react-components - react-static-container - Renders static content efficiently. (Performance / UI)
- awesome-react-components - react-static-container - Renders static content efficiently. (Performance / UI)
- fucking-awesome-react-components - react-static-container - Renders static content efficiently. (Performance / UI)
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 (
{this.props.value}
);
}
);
````StaticContainer` also takes a `shouldUpdate` prop as an escape hatch, allowing granular updates.