Skip to content

is withProfiler able to detect updates due to state changes? #7781

Answered by Twipped
Twipped asked this question in Q&A
Discussion options

You must be logged in to vote

I ended up writing my own HOC for functional components that addresses this.

/**
 * React App component wrapper to initialize Sentry instrumentation.
 *
 * @function withProfiling
 * @param {React.Component} WrappedComponent App component to instrument
 * @param {object} options
 * @param {string} options.name The name of the component being profiled. If this is omitted,
 * it will attempt to pull the name from the component's `displayName` or function name.
 * @param {boolean} options.disabled
 * @param {boolean} options.includeRender Defaults to true. This controls if a profiling
 * span should be created for the initial rendering of the component.
 * @param {boolean} options.includeUpd…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Twipped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant