/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
errors/invalid-dynamic-options-type.mdx
33 строки
706 B
Delba de Oliveira
docs: Move optimizing pages to guides (#78500)
24 апр 2025, 21:40
Не верифицирован
24 апр 2025, 21:40
76ade73
Код
Авторство
О чём код?
--- title: 'Invalid options type in a `next/dynamic` call' --- ## Why This Error Occurred You have an invalid options type in a `next/dynamic` call. The options must be an object literal. ## Possible Ways to Fix It **Before** ```jsx filename="example.js" import dynamic from 'next/dynamic' const options = { loading: () => <p>...</p>, ssr: false } const DynamicComponent = dynamic(() => import('../components/hello'), options) ``` **After** ```jsx filename="example.js" import dynamic from 'next/dynamic' const DynamicComponent = dynamic(() => import('../components/hello'), { loading: () => <p>...</p>, ssr: false, }) ``` ## Useful Links - [Dynamic Import](/docs/pages/guides/lazy-loading)