$ cnpm install static-container
A React component wrapper for update performance improvement.
Example
Wrap any components inside StaticContainer and set shouldUpdate={false}.
The children inside StaticContainer will not be updated from parent life cycle.
Use it wisely.
import React from 'react';
import StaticContainer from 'status-container';
function SomeComponent() {
return (
<StaticContainer shouldUpdate={false}>
<TheComponentWillNeverUpdated />
<StaticContainer/>
)
}
Copyright 2013 - present © cnpmjs.org | Home |