silverwolf-x's picture
download
raw
374 Bytes
'use client'
import { ReactNode, useActionState } from 'react'
export function Form({ action }: { action: () => Promise<ReactNode> }) {
const [result, formAction] = useActionState(action, 'initial')
return (
<form action={formAction}>
<h1>Inline Server Action with Cache Components</h1>
<button>Submit</button>
<p>{result}</p>
</form>
)
}

Xet Storage Details

Size:
374 Bytes
·
Xet hash:
8a060784a6e66c43be65d1e7ca406b171b5cd4fe09028682b88aba1764a4e6f0

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.