Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 1d4b73a

Browse files
committed
Updated example
1 parent 7a477bc commit 1d4b73a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ export default class MyComponent extends React.Component {
2323

2424
It can also fallback to being used like:
2525
```javascript
26-
var perf = require('react-perf-component')
26+
import perf from 'react-perf-component'
2727

28-
var MyComponent = React.createClass({
29-
render: function() {...}
30-
});
28+
class MyComponent extends React.Component {
29+
render() {
30+
...
31+
}
32+
}
3133

32-
module.exports = perf(MyComponent);
34+
export default perf(MyComponent);
3335
```
3436

3537
### Thanks

0 commit comments

Comments
 (0)