Skip to content

Commit

Permalink
Revert "update react perf docs (#8060) and (#6174)" (#8997)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Feb 13, 2017
1 parent 1d4b165 commit 1d786cd
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 252 deletions.
34 changes: 0 additions & 34 deletions docs/docs/addons-perf.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ next: test-utils.html
import Perf from 'react-addons-perf' // ES6
var Perf = require('react-addons-perf') // ES5 with npm
var Perf = React.addons.Perf; // ES5 with react-with-addons.js

// Usually importing Perf in ES6 with a module bundler
// doesn't make Perf available as global and throws a
// ReferenceError so create a global
window.Perf = Perf;
```


Expand Down Expand Up @@ -62,34 +57,6 @@ The following methods use the measurements returned by [`Perf.getLastMeasurement

* * *

## Example Usage

We will take simple example of a form which can be used to submit comments and then listing all comments. The example code is [available on GitHub](https://github.com/dhyey35/react-example-for-performance/blob/master/public/scripts/example.js).

```javascript
import { Component } from 'react'
import Perf from 'react-addons-perf'

const Comment = (props) => (
<div className="comment">
<h2 className="commentAuthor">
{props.author}
</h2>
<span>{props.children.toString()}</span>
</div>
)
//code...

ReactDOM.render(
<CommentBox />,
document.getElementById('content')
);
```
Open the developer console in the browser and type `Perf.start()`. Then perform the action you want to monitor, like submitting a form. Finally, type `Perf.stop()` and `Perf.getLastMeasurements()` to get the measurements. See the Reference below for more methods.

![](/react/img/docs/addons-perf.png)

* * *
## Reference

### `start()`
Expand Down Expand Up @@ -178,4 +145,3 @@ Perf.printDOM(measurements)
```

This method has been renamed to [`printOperations()`](#printoperations). Currently `printDOM()` still exists as an alias but it prints a deprecation warning and will eventually be removed.

218 changes: 0 additions & 218 deletions docs/downloads/perf-tutorial.html

This file was deleted.

Binary file removed docs/img/docs/react-perf.png
Binary file not shown.

0 comments on commit 1d786cd

Please sign in to comment.