GitXplorerGitXplorer
s

react-perf-component

public
16 stars
1 forks
1 issues

Commits

List of commits on branch master.
Unverified
b6b34c578e715940e59f958ba5b5d1b52a64f253

Add Sail CI file

ssheepsteak committed 6 years ago
Unverified
5b8a8e86dfb2ad5392e9f1fee6932f004a43e535

2.1.3

ssheepsteak committed 8 years ago
Unverified
e2bc235c541378d1ff0f8b92aac3b1eaba796fdc

Remove `npm test` from prepublish script

ssheepsteak committed 8 years ago
Unverified
8ae609bf38a80bfdac3d550ae83726c172bb7d72

v2.1.2

ssheepsteak committed 8 years ago
Unverified
bd44bbfadf5000eaff4df4c0344a3804c7ae9fa7

v2.1.1

ssheepsteak committed 8 years ago
Unverified
883e20a4763ff24c64dde6425a444152318d8a3d

Make sure `lib` gets published by Yarn

ssheepsteak committed 8 years ago

README

The README file for this repository.

react-perf-component

CircleCI

A higher-order React component for testing the performance of other components.

At the moment it only prints the result from Perf.printWasted as that's the most useful part.

npm install react-perf-component

Example

The best way to use this component is via babel and ES2016/ES7 decorators:

import perf from 'react-perf-component'

@perf
export default class MyComponent extends React.Component {
  render() {
    ...
  }
}

It can also fallback to being used like:

import perf from 'react-perf-component'

class MyComponent extends React.Component {
  render() {
    ...
  }
}

export default perf(MyComponent);

Thanks

Special mention to PureSin/react-perf for helping me to understand how to wrap a component with React.addons.Perf.