Next.js · Middle · Question 16 of 75

Can you use next/dynamic with ssr: false in a server component?

Explanation

Use the ssr: false option inside a 'use client' file: for example, for a component that accesses window on import. In a server component, Next.js throws an error. Server components don't ship their code to the browser anyway.

Further reading

Problem with a question

Next.js · Middle · question 16

Test yourself

Take the Next.js · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz