title |
---|
Invalid options type in a `next/dynamic` call |
You have an invalid options type in a next/dynamic
call. The options must be an object literal.
Before
import dynamic from 'next/dynamic'
const options = { loading: () => <p>...</p>, ssr: false }
const DynamicComponent = dynamic(() => import('../components/hello'), options)
After
import dynamic from 'next/dynamic'
const DynamicComponent = dynamic(() => import('../components/hello'), {
loading: () => <p>...</p>,
ssr: false,
})