Package Exports
- react-static-container
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-static-container) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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
npm install react-static-containerUsage
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.