Download next.js/test/e2e/app-dir/actions/app/dynamic-csr/csr.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 247 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/actions/app/dynamic-csr/csr.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/actions/app/dynamic-csr/csr.js
-
curl -L -o csr.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/actions/app/dynamic-csr/csr.js
247 Bytes
| 'use client' | |
| import { inc } from '../client/actions' | |
| import { useState } from 'react' | |
| export function CSR() { | |
| const [count, setCount] = useState(0) | |
| return ( | |
| <button onClick={async () => setCount(await inc(count))}>{count}</button> | |
| ) | |
| } | |