mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
- rename `unstable_after` -> `after` - remove `experimental.after` flag (and warn if it's present) i separated the big find-and-replace into a separate commit so that it's easier to see what else changed apart from that. does not touch docs, that's in #73038
29 lines
684 B
TypeScript
29 lines
684 B
TypeScript
import Link from 'next/link'
|
|
import { after } from 'next/server'
|
|
import React from 'react'
|
|
import { fetchRandomValue } from '../lib/fetch-random-value'
|
|
import { RefreshButton } from './refresh-button'
|
|
|
|
export async function SharedPage({ runtime }: { runtime: string }) {
|
|
const value = await fetchRandomValue(`render-${runtime}`)
|
|
|
|
after(async () => {
|
|
const value = await fetchRandomValue(`after-${runtime}`)
|
|
console.log('After:', value)
|
|
})
|
|
|
|
return (
|
|
<>
|
|
<h1>{runtime}</h1>
|
|
<p id="content">foo</p>
|
|
<p id="value">{value}</p>
|
|
<p>
|
|
<Link href="/">back to root</Link>
|
|
</p>
|
|
<p>
|
|
<RefreshButton />
|
|
</p>
|
|
</>
|
|
)
|
|
}
|