Skip to content

Instantly share code, notes, and snippets.

@matiasfha
Created June 11, 2018 12:37
Show Gist options
  • Save matiasfha/3a4b36992626ee44b649849ec5879261 to your computer and use it in GitHub Desktop.
Save matiasfha/3a4b36992626ee44b649849ec5879261 to your computer and use it in GitHub Desktop.
Profile Component
const Profiler = React.unstable_Profiler;
render(
{/* Components not measured... */}
<Profiler id="some identifier" onRender={loggingFunction}>
{/* Components to be measured... */}
</Profiler>
{/* Components not measured... */}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment