Download next.js/test/e2e/app-dir/actions/app/encryption/form.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 275 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/actions/app/encryption/form.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/actions/app/encryption/form.js
-
curl -L -o form.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/actions/app/encryption/form.js
275 Bytes
| 'use client' | |
| import { useActionState } from 'react' | |
| export default function Form({ action }) { | |
| const [result, formAction] = useActionState(action, 'initial') | |
| return ( | |
| <form action={formAction}> | |
| <button>Submit</button> | |
| <p>{result}</p> | |
| </form> | |
| ) | |
| } | |