static-container

1.7.1 • Public • Published

static-container npm version


A React component wrapper for update performance improvement.

Example

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/>
  )
}

Package Sidebar

Install

npm i static-container

Weekly Downloads

11,399

Version

1.7.1

License

MIT

Unpacked Size

2.62 kB

Total Files

5

Last publish

Collaborators

  • magicismight