react-code-dataset / next.js /test /development /app-dir /server-components-hmr-cache /components /refresh-button.tsx
Download next.js/test/development/app-dir/server-components-hmr-cache/components/refresh-button.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 218 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/app-dir/server-components-hmr-cache/components/refresh-button.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/development/app-dir/server-components-hmr-cache/components/refresh-button.tsx
-
curl -L -o refresh-button.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/app-dir/server-components-hmr-cache/components/refresh-button.tsx
218 Bytes
| 'use client' | |
| import { useRouter } from 'next/navigation' | |
| export function RefreshButton() { | |
| const { refresh } = useRouter() | |
| return ( | |
| <button type="button" onClick={refresh}> | |
| refresh | |
| </button> | |
| ) | |
| } | |