mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
18 lines
342 B
TypeScript
18 lines
342 B
TypeScript
'use client'
|
|
|
|
import { useState, use } from 'react';
|
|
|
|
interface PageProps {
|
|
params: Promise<{ slug: string }>
|
|
searchParams: Promise<any>
|
|
}
|
|
|
|
export default function Page(props: PageProps) {
|
|
const params = use(props.params);
|
|
const [text, setText] = useState('')
|
|
// usage of `params`
|
|
globalThis.f1(params)
|
|
globalThis.f2(params)
|
|
}
|
|
|