#Clarification On Dynamic Server Components

1 messages · Page 1 of 1 (latest)

sharp tendon
#

Hi, just wanted to confirm i understood it correctly. Let's say I have the following

export default function ServerComponent() {
  const value = expensiveChildren{}
  return (
    <ClientComponent>
      {value}
    </ClientComponent>
  );
}

Does it make sense to make the ServerComponent dynamic?

import dynamic from 'next/dynamic';

const DynamicServerComponent = dynamic(() => import('./ServerComponent'), {
  loading: () => <p>Loading server stuff…</p>,
});

Will it still correctly do a full SSR and then serve the compiled static component?