reactjs / React Static Container
Licence: other
Renders static content efficiently by allowing React to short-circuit the reconciliation process.
Stars: ✭ 220
Programming Languages
javascript
184084 projects - #8 most used programming language
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
npm install react-static-container
Usage
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.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].
