Skip to content

Instantly share code, notes, and snippets.

@acoomans
Last active September 14, 2023 09:18
Show Gist options
  • Save acoomans/26841a7588a9fc6bc2733a49352efbbc to your computer and use it in GitHub Desktop.
Save acoomans/26841a7588a9fc6bc2733a49352efbbc to your computer and use it in GitHub Desktop.
// import the profiler (be sure to use our Profiler and not React's):
import { Profiler } from 'profiler/profiler';
// Wrap the desired component with our Profiler component
<Profiler
component="ComponentToProfile"
id={someId}
>
<ComponentToProfile>...</ComponentToProfile>
</Profiler>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment