We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4a73f7 commit 1db3474Copy full SHA for 1db3474
packages/react/src/profiler.tsx
@@ -133,7 +133,7 @@ function withProfiler<P extends object>(WrappedComponent: React.ComponentType<P>
133
* @param name displayName of component being profiled
134
*/
135
function useProfiler(name: string): void {
136
- const activity = getInitActivity(name);
+ const [activity] = React.useState(() => getInitActivity(name));
137
138
React.useEffect(() => {
139
afterNextFrame(() => {
0 commit comments