mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Follow up to https://github.com/vercel/next.js/pull/54081 -- this was restoring the router tree improperly causing an error on bfcache hits Had to override some default behaviors to prevent `forward` / `back` in playwright from hanging indefinitely since no load event is firing in these cases Fixes #54184 Closes NEXT-1528
18 lines
422 B
JavaScript
18 lines
422 B
JavaScript
'use client'
|
|
import React from 'react'
|
|
import Link from 'next/link'
|
|
|
|
export default function Page() {
|
|
const [counter, setCounter] = React.useState(0)
|
|
return (
|
|
<div>
|
|
<h1>BFCache Test</h1>
|
|
<button onClick={() => setCounter((c) => c + 1)}>
|
|
Trigger Re-Render
|
|
</button>
|
|
<div id="counter">{counter}</div>
|
|
<Link href="https://example.vercel.sh">External Page</Link>
|
|
</div>
|
|
)
|
|
}
|