rsnext/test/integration/react-profiling-mode/pages/index.js
Jiachi Liu 3fb41561c4
Support react profiling option for app dir client components (#51947)
`reactProductionProfiling` was a next config working for pages before mainly for profiling react, this PR also enables it for pages.

### Chanegs

* Add react profiling entry and related alias
* Fix `reactProductionProfiling` is missing in next config type and schema

Closes #51131
2023-06-29 00:00:11 +00:00

17 lines
317 B
JavaScript

import React from 'react'
const Index = () => {
return (
<React.Profiler
id="hello"
onRender={(...res) => {
window.profileResults = window.profileResults || []
window.profileResults.push(res)
}}
>
<p>hello pages</p>
</React.Profiler>
)
}
export default Index