Download next.js/test/development/browser-logs/fixtures/app/client-error/page.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 364 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/browser-logs/fixtures/app/client-error/page.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/development/browser-logs/fixtures/app/client-error/page.js
-
curl -L -o page.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/browser-logs/fixtures/app/client-error/page.js
364 Bytes
| 'use client' | |
| function throwError() { | |
| throw new Error('Client component error in app router') | |
| } | |
| function callError() { | |
| throwError() | |
| } | |
| export default function ClientErrorPage() { | |
| return ( | |
| <div> | |
| <button | |
| id="error-button" | |
| onClick={() => { | |
| callError() | |
| }} | |
| > | |
| Throw Error | |
| </button> | |
| </div> | |
| ) | |
| } | |