mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
d95aed607c
This fixes `router.isReady` being incorrect in dev mode due to the `isAutoExport` field being false from `hasConcurrentFeatures` being flagged similar to the static 404 in https://github.com/vercel/next.js/pull/35749. While investigating this I also noticed we aren't properly detecting react 18 when no `next.config.js` is present. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md` Fixes: https://github.com/vercel/next.js/issues/35754 x-ref: https://github.com/vercel/next.js/pull/35749
21 lines
390 B
JavaScript
21 lines
390 B
JavaScript
import { useRouter } from 'next/router'
|
|
|
|
export default function Page(props) {
|
|
const router = useRouter()
|
|
return (
|
|
<>
|
|
<p>getStaticProps router.isReady</p>
|
|
<p id="query">{JSON.stringify(router.query)}</p>
|
|
<p id="ready">{router.isReady ? 'yes' : 'no'}</p>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export function getStaticProps() {
|
|
return {
|
|
props: {
|
|
now: Date.now(),
|
|
},
|
|
}
|
|
}
|