react-pure-decorator
v0.0.2
Published
Marks the react component as pure for optimized rendering
Downloads
5
Readme
react-pure-decorator
Marks the react component as pure for optimized rendering
Installation
Run
<npm install --save react-pure-decorator>
and then use the default export of the module
Purpose
Pure prevents unneccesary rendering of a page
Example
Using the Pure decorator, you can attach a stylesheet to a component like this:
import {Pure} from 'decorators';
@Pure()
export class ControlPanelLine extends Component {
static displayName = 'ControlPanelLine';