react-code-dataset / next.js /test /e2e /app-dir /app-css /app /template /clientcomponent /template.js
Download next.js/test/e2e/app-dir/app-css/app/template/clientcomponent/template.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 369 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-css/app/template/clientcomponent/template.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/app-css/app/template/clientcomponent/template.js
-
curl -L -o template.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-css/app/template/clientcomponent/template.js
369 Bytes
| 'use client' | |
| import { useState } from 'react' | |
| import styles from './style.module.css' | |
| export default function Template({ children }) { | |
| const [count, setCount] = useState(0) | |
| return ( | |
| <> | |
| <h1>Template {count}</h1> | |
| <button className={styles.button} onClick={() => setCount(count + 1)}> | |
| Increment | |
| </button> | |
| {children} | |
| </> | |
| ) | |
| } | |