mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
23 lines
448 B
TypeScript
23 lines
448 B
TypeScript
'use client'
|
|
|
|
import { useActionState } from 'react'
|
|
import Form from 'next/form'
|
|
|
|
import { callNotFoundInAction } from './actions'
|
|
|
|
export default function Home() {
|
|
const [, submit] = useActionState(callNotFoundInAction, null)
|
|
return (
|
|
<>
|
|
<div>hello</div>
|
|
<div>
|
|
<Form action={submit}>
|
|
<button id="not-found-btn" type="submit">
|
|
Submit
|
|
</button>
|
|
</Form>
|
|
</div>
|
|
</>
|
|
)
|
|
}
|