Download next.js/test/e2e/define/app/with-server-only/page.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 612 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/define/app/with-server-only/page.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/define/app/with-server-only/page.js
-
curl -L -o page.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/define/app/with-server-only/page.js
612 Bytes
| /* eslint-disable no-undef */ | |
| import { ClientValue, ClientExpr } from './client-component' | |
| export default function Page() { | |
| return ( | |
| <ul> | |
| <li> | |
| Server value:{' '} | |
| {typeof MY_SERVER_VARIABLE === 'string' | |
| ? MY_SERVER_VARIABLE | |
| : 'not set'} | |
| </li> | |
| <li> | |
| Client value: <ClientValue /> | |
| </li> | |
| <li> | |
| Server expr:{' '} | |
| {typeof process.env.MY_MAGIC_SERVER_EXPR === 'string' | |
| ? process.env.MY_MAGIC_SERVER_EXPR | |
| : 'not set'} | |
| </li> | |
| <li> | |
| Client expr: <ClientExpr /> | |
| </li> | |
| </ul> | |
| ) | |
| } | |