Skip to content

Commit 4fe251d

Browse files
committed
update docs
1 parent 16d7dca commit 4fe251d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/02-app/01-building-your-application/06-optimizing/07-lazy-loading.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ const ComponentC = dynamic(() => import('../components/C'), { ssr: false })
7272
If you dynamically import a Server Component, only the Client Components that are children of the Server Component will be lazy-loaded - not the Server Component itself.
7373
It will also help preload the static assets such as CSS when you're using it in Server Components.
7474

75-
> **Note:** `ssr: false` option is not supported in Server Components.
76-
7775
```jsx filename="app/page.js"
7876
import dynamic from 'next/dynamic'
7977

@@ -89,6 +87,9 @@ export default function ServerComponentExample() {
8987
}
9088
```
9189

90+
> **Note:** `ssr: false` option is not supported in Server Components. You will see an error if you try to use it in Server Components.
91+
> `ssr: false` is not allowed with `next/dynamic` in Server Components. Please move it into a client component.
92+
9293
### Loading External Libraries
9394

9495
External libraries can be loaded on demand using the [`import()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/import) function. This example uses the external library `fuse.js` for fuzzy search. The module is only loaded on the client after the user types in the search input.

0 commit comments

Comments
 (0)