next/dynamic ssr: false in a Server Component

perf/dynamic-ssr-falseerrornextjs-16correctness

Why it matters

Next.js fails the build: ssr: false is not allowed with next/dynamic in Server Components.

Fix

Move the dynamic() call into a "use client" component and render that from the server.

Credit

  • From the Next.js team

    The lazy-loading guide says ssr: false is not allowed with next/dynamic in Server Components; put it in a Client Component.

References

See it