Last active
May 28, 2017 08:39
-
-
Save andon/9e9b100f637d4232cf363e36fcf8c8dd to your computer and use it in GitHub Desktop.
Enable PerfMonitor in react-native app
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 PerfMonitor from 'react-native/Libraries/Performance/RCTRenderingPerf'; | |
PerfMonitor.toggle(); | |
PerfMonitor.start(); | |
class App extends Component { | |
componentDidMount() { | |
setTimeout(() => { | |
PerfMonitor.stop(); | |
}, 8000); | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment