Buckets:
| 'use client' | |
| import { useActionState } from 'react' | |
| export function Form({ | |
| echoAction, | |
| }: { | |
| echoAction: (value: string) => Promise<string> | |
| }) { | |
| let [result, formAction] = useActionState( | |
| () => echoAction(new Array(100000).fill('あ').join('')), | |
| null | |
| ) | |
| let aCount = result ? result.match(/あ/g)!.length : 0 | |
| return ( | |
| <form action={formAction}> | |
| {result && ( | |
| <p> | |
| Server responded with {aCount} あ characters and{' '} | |
| {result.length - aCount} � characters. | |
| </p> | |
| )} | |
| <button>Submit</button> | |
| </form> | |
| ) | |
| } | |
Xet Storage Details
- Size:
- 588 Bytes
- Xet hash:
- 2311231f909f57001ad25616afe1f55248c1af8a1def812bf01fffa38801690b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.