Skip to content

Instantly share code, notes, and snippets.

@andon
Last active May 28, 2017 08:39
Show Gist options
  • Save andon/9e9b100f637d4232cf363e36fcf8c8dd to your computer and use it in GitHub Desktop.
Save andon/9e9b100f637d4232cf363e36fcf8c8dd to your computer and use it in GitHub Desktop.
Enable PerfMonitor in react-native app
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