Files
next.js/test/e2e/app-dir/unstable-io/fixtures/default/pages/pages-use.tsx
Josh StoryandGitHub fd3404504e Fix React18 tests for unstable_io (#92543)
The last attempt to skip tests doesn't work because there is a failure
to build. This strategy takes the fixture and only conditionally calls
`use` if it exists
2026-04-08 15:16:03 -07:00

15 lines
327 B
TypeScript

import React from 'react'
import { unstable_io } from 'next/cache'
export default function PagesUse() {
if (typeof React.use === 'function') {
React.use(unstable_io())
}
return (
<>
<p>This page calls React.use(unstable_io()) in the component body.</p>
<div id="pages-content">ok</div>
</>
)
}