Download next.js/test/production/bfcache-routing/app/page.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 422 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/bfcache-routing/app/page.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/production/bfcache-routing/app/page.js
-
curl -L -o page.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/bfcache-routing/app/page.js
422 Bytes
| 'use client' | |
| import React from 'react' | |
| import Link from 'next/link' | |
| export default function Page() { | |
| const [counter, setCounter] = React.useState(0) | |
| return ( | |
| <div> | |
| <h1>BFCache Test</h1> | |
| <button onClick={() => setCounter((c) => c + 1)}> | |
| Trigger Re-Render | |
| </button> | |
| <div id="counter">{counter}</div> | |
| <Link href="https://example.vercel.sh">External Page</Link> | |
| </div> | |
| ) | |
| } | |