dt.in.th

To render a React component only on client-side in Next.js, use next/dynamic with { ssr: false }.

Further reading

  • Piumi Liyana Gunawardhana (2022). “Using Non-SSR Friendly Components with Next.js.” Bits and Pieces
  • “Dynamic Import.” Next.js docs

@dtinth