react-code-dataset / next.js /crates /next-custom-transforms /tests /fixture /next-dynamic /with-options /output-server.js
Download next.js/crates/next-custom-transforms/tests/fixture/next-dynamic/with-options/output-server.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 745 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/crates/next-custom-transforms/tests/fixture/next-dynamic/with-options/output-server.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/crates/next-custom-transforms/tests/fixture/next-dynamic/with-options/output-server.js
-
curl -L -o output-server.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/crates/next-custom-transforms/tests/fixture/next-dynamic/with-options/output-server.js
745 Bytes
| import dynamic from 'next/dynamic'; | |
| const DynamicComponentWithCustomLoading = dynamic(()=>import('../components/hello'), { | |
| loadableGenerated: { | |
| modules: [ | |
| "src/some-file.js -> " + "../components/hello" | |
| ] | |
| }, | |
| loading: ()=><p>...</p> | |
| }); | |
| const DynamicClientOnlyComponent = dynamic(()=>import('../components/hello'), { | |
| loadableGenerated: { | |
| modules: [ | |
| "src/some-file.js -> " + "../components/hello" | |
| ] | |
| }, | |
| ssr: false | |
| }); | |
| const DynamicClientOnlyComponentWithSuspense = dynamic(()=>import('../components/hello'), { | |
| loadableGenerated: { | |
| modules: [ | |
| "src/some-file.js -> " + "../components/hello" | |
| ] | |
| }, | |
| ssr: false, | |
| suspense: true | |
| }); | |