react-code-dataset
/
next.js
/crates
/next-custom-transforms
/tests
/fixture
/next-dynamic
/with-options
/input.js
| import dynamic from 'next/dynamic' | |
| const DynamicComponentWithCustomLoading = dynamic( | |
| () => import('../components/hello'), | |
| { loading: () => <p>...</p> } | |
| ) | |
| const DynamicClientOnlyComponent = dynamic( | |
| () => import('../components/hello'), | |
| { ssr: false } | |
| ) | |
| const DynamicClientOnlyComponentWithSuspense = dynamic( | |
| () => import('../components/hello'), | |
| { ssr: false, suspense: true } | |
| ) | |