mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
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
15 lines
327 B
TypeScript
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>
|
|
</>
|
|
)
|
|
}
|