Created
September 6, 2017 15:03
-
-
Save robskidmore/bca31429cfe5dcf40ae7350abe229aff to your computer and use it in GitHub Desktop.
Performance Test React Component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import Perf from 'react-addons-perf'; | |
window.Perf = Perf; | |
class Component extends React.Component { | |
componentDidMount() { | |
setImmediate(() => { | |
Perf.start(); | |
}); | |
setTimeout(() => { | |
Perf.stop(); | |
Perf.printWasted(); | |
}, 7000); | |
} | |
render() { | |
return ( | |
<div>Component Stuff</div> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment