import Link from 'next/link' import { connection } from 'next/server' export default async function SamePageNav() { // Treat the page as dynamic so we can detect when it's refreshed await connection() return ( <>

Demonstrates that when navigating to the exact same URL as the current location, we refresh the page segments.

Observe that the random number below changes if you click the same link multiple times, but not when you switch between links.

Random number (changes on each refresh):{' '} {Math.floor(Math.random() * 1_000_000_000)}

) }